Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1431 from wayneeseguin/feature/requirements_exec
runable requirements
- Loading branch information
Showing
18 changed files
with
792 additions
and
384 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
function requirements_arch() | ||
{ | ||
typeset -a command_to_run command_flags | ||
command_to_run=() | ||
command_flags=() | ||
|
||
while | ||
(( $# )) | ||
do | ||
case "$1" in | ||
(echo) | ||
command_to_run+=( $1 ) | ||
shift | ||
;; | ||
(run) | ||
shift | ||
;; | ||
(force) | ||
command_flags+=( --noconfirm ) | ||
shift | ||
;; | ||
(*) | ||
break | ||
;; | ||
esac | ||
done | ||
|
||
(( UID == 0 )) || command_to_run+=( sudo ) | ||
|
||
while | ||
(( $# )) | ||
do | ||
case "$1" in | ||
(update-system) | ||
true | ||
;; | ||
(rvm) | ||
"${command_to_run[@]}" pacman -SUy --needed --recursive "${command_flags[@]}" bash curl git patch | ||
;; | ||
(jruby*head) | ||
"${command_to_run[@]}" pacman -SUy --needed --recursive "${command_flags[@]}" jdk7-openjdk jre7-openjdk curl apache-ant | ||
;; | ||
(jruby*) | ||
"${command_to_run[@]}" pacman -SUy --needed --recursive "${command_flags[@]}" jdk7-openjdk jre7-openjdk curl | ||
;; | ||
(ir*) | ||
"${command_to_run[@]}" pacman -SUy --needed --recursive "${command_flags[@]}" mono | ||
;; | ||
(opal) | ||
"${command_to_run[@]}" pacman -SUy --needed --recursive "${command_flags[@]}" nodejs | ||
;; | ||
(*) | ||
"${command_to_run[@]}" pacman -SUy --needed --recursive "${command_flags[@]}" gcc patch curl zlib readline libxml2 libxslt git autoconf automake diffutils make libtool bison subversion | ||
;; | ||
esac | ||
shift | ||
done | ||
} | ||
|
||
requirements_arch "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
function requirements_yum() | ||
{ | ||
typeset -a command_to_run command_flags | ||
command_to_run=() | ||
command_flags=() | ||
|
||
while | ||
(( $# )) | ||
do | ||
case "$1" in | ||
(echo) | ||
command_to_run+=( $1 ) | ||
shift | ||
;; | ||
(run) | ||
shift | ||
;; | ||
(force) | ||
command_flags+=( -y ) | ||
shift | ||
;; | ||
(*) | ||
break | ||
;; | ||
esac | ||
done | ||
|
||
(( UID == 0 )) || command_to_run+=( sudo ) | ||
|
||
while | ||
(( $# )) | ||
do | ||
case "$1" in | ||
(update-system) | ||
true | ||
;; | ||
(rvm) | ||
"${command_to_run[@]}" yum install "${command_flags[@]}" bash curl git patch | ||
;; | ||
(jruby*) | ||
"${command_to_run[@]}" yum install "${command_flags[@]}" java | ||
;; | ||
(ir*) | ||
true # not that easy | ||
;; | ||
(opal) | ||
true # not that easy | ||
;; | ||
(*) | ||
"${command_to_run[@]}" yum install "${command_flags[@]}" gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel | ||
;; | ||
esac | ||
shift | ||
done | ||
} | ||
|
||
requirements_yum "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ubuntu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
centos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
function requirements_gentoo() | ||
{ | ||
typeset -a command_to_run command_flags | ||
command_to_run=() | ||
command_flags=() | ||
|
||
while | ||
(( $# )) | ||
do | ||
case "$1" in | ||
(echo) | ||
command_to_run+=( $1 ) | ||
shift | ||
;; | ||
(force|run) | ||
shift | ||
;; | ||
(*) | ||
break | ||
;; | ||
esac | ||
done | ||
|
||
(( UID == 0 )) || command_to_run+=( sudo ) | ||
|
||
while | ||
(( $# )) | ||
do | ||
case "$1" in | ||
(update-system) | ||
"${command_to_run[@]}" emerge --sync | ||
;; | ||
(rvm) | ||
"${command_to_run[@]}" emerge bash curl git patch | ||
;; | ||
(jruby*) | ||
"${command_to_run[@]}" emerge dev-java/sun-jdk dev-java/sun-jre-bin | ||
;; | ||
(ir*) | ||
"${command_to_run[@]}" emerge dev-lang/mono | ||
;; | ||
(opal) | ||
"${command_to_run[@]}" emerge nodejs | ||
;; | ||
(*) | ||
"${command_to_run[@]}" emerge libiconv readline zlib openssl curl git libyaml sqlite libxslt libtool gcc autoconf automake bison m4 | ||
;; | ||
esac | ||
shift | ||
done | ||
} | ||
|
||
requirements_gentoo "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
function requirements_gentoo() | ||
{ | ||
typeset -a command_to_run __ctr_sudo | ||
typeset __ctr_echo | ||
command_to_run=() | ||
__ctr_sudo=() | ||
__ctr_echo=0 | ||
|
||
while | ||
(( $# )) | ||
do | ||
case "$1" in | ||
(echo) | ||
command_to_run+=( $1 ) | ||
__ctr_echo=1 | ||
shift | ||
;; | ||
(force) | ||
shift | ||
;; | ||
(*) | ||
break | ||
;; | ||
esac | ||
done | ||
|
||
(( UID == 0 )) || | ||
{ | ||
command_to_run+=( sudo ) | ||
__ctr_sudo+=( sudo ) | ||
} | ||
|
||
while | ||
(( $# )) | ||
do | ||
case "$1" in | ||
(update-system) | ||
[[ -d /usr/ports ]] || | ||
{ | ||
if (( __ctr_echo )) | ||
then echo "curl ftp://ftp.openbsd.org/pub/OpenBSD/$(uname -r)/ports.tar.gz | ${__ctr_sudo[$@]} tar -C /usr -zx" | ||
else curl ftp://ftp.openbsd.org/pub/OpenBSD/$(uname -r)/ports.tar.gz | ${__ctr_sudo[$@]} tar -C /usr -zx | ||
fi | ||
} | ||
;; | ||
(rvm) | ||
"${command_to_run[@]}" pkg_add bash curl git patch | ||
;; | ||
(jruby-head*) | ||
"${command_to_run[@]}" pkg_add jdk apache-ant | ||
;; | ||
(jruby*) | ||
"${command_to_run[@]}" pkg_add jdk | ||
;; | ||
(ir*) | ||
"${command_to_run[@]}" pkg_add mono | ||
;; | ||
(opal) | ||
"${command_to_run[@]}" make -C /usr/ports/www/node install clean | ||
;; | ||
(*) | ||
"${command_to_run[@]}" pkg_add gcc readline libxml2 libxslt autoconf automake diffutils make libtool bison | ||
;; | ||
esac | ||
shift | ||
done | ||
} | ||
|
||
requirements_gentoo "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
function requirements_gentoo() | ||
{ | ||
typeset -a command_to_run command_flags | ||
command_to_run=() | ||
command_flags=() | ||
|
||
while | ||
(( $# )) | ||
do | ||
case "$1" in | ||
(echo) | ||
command_to_run+=( $1 ) | ||
shift | ||
;; | ||
(force|run) | ||
shift | ||
;; | ||
(*) | ||
break | ||
;; | ||
esac | ||
done | ||
|
||
(( UID == 0 )) || command_to_run+=( sudo ) | ||
|
||
while | ||
(( $# )) | ||
do | ||
case "$1" in | ||
(update-system) | ||
true | ||
;; | ||
(rvm) | ||
"${command_to_run[@]}" pkg install bash curl git patch | ||
;; | ||
(jruby-head*) | ||
"${command_to_run[@]}" pkg install jdk apache-ant | ||
;; | ||
(jruby*) | ||
"${command_to_run[@]}" pkg install jdk | ||
;; | ||
(ir*) | ||
"${command_to_run[@]}" pkg install mono | ||
;; | ||
(opal) | ||
"${command_to_run[@]}" pkg install node-devel | ||
;; | ||
(*) | ||
"${command_to_run[@]}" pkg install text/gnu-patch runtime/gcc developer/library/lint system/header system/library/math/header-math file/gnu-coreutils | ||
;; | ||
esac | ||
shift | ||
done | ||
} | ||
|
||
requirements_gentoo "$@" |
Oops, something went wrong.