diff options
author | Yves Fischer <yves.fischer@cern.ch> | 2016-05-24 19:29:09 +0200 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2016-05-26 20:01:07 +0200 |
commit | 283845b18c97cfbae75e39ae89fbaed2e1ee0a91 (patch) | |
tree | a452b085e4b1a3bf3fb40bfd87639e228bb7f3f3 /packages/scripts/resources | |
parent | fd1e0cea253494df43aa5702c6796cf1f79ad746 (diff) | |
download | debian-packages-283845b18c97cfbae75e39ae89fbaed2e1ee0a91.tar.gz debian-packages-283845b18c97cfbae75e39ae89fbaed2e1ee0a91.zip |
update scripts
Diffstat (limited to 'packages/scripts/resources')
-rw-r--r-- | packages/scripts/resources/lib/activate.inc.sh | 14 | ||||
-rw-r--r-- | packages/scripts/resources/lib/environments.inc.sh | 70 |
2 files changed, 38 insertions, 46 deletions
diff --git a/packages/scripts/resources/lib/activate.inc.sh b/packages/scripts/resources/lib/activate.inc.sh index 79bed6b..b77b9fd 100644 --- a/packages/scripts/resources/lib/activate.inc.sh +++ b/packages/scripts/resources/lib/activate.inc.sh @@ -1,3 +1,17 @@ +# use to process /opt/activator entries +__activator() { + for product in $*; do + if [ -d "/opt/activator/$product/env" ]; then + for env in /opt/activator/$product/env/*; do + name=$(basename "$env") + eval "export '$name'='$(cat $env)'" + done + fi + if [ -d "/opt/activator/$product/bin" ]; then + export PATH="/opt/activator/$product/bin":$PATH + fi + done +} # non-interactive activate __activate_env() { diff --git a/packages/scripts/resources/lib/environments.inc.sh b/packages/scripts/resources/lib/environments.inc.sh index 8960d95..d615b47 100644 --- a/packages/scripts/resources/lib/environments.inc.sh +++ b/packages/scripts/resources/lib/environments.inc.sh @@ -1,46 +1,24 @@ - -function __sub_java7() { - export JAVA_HOME=/usr/lib/jvm/java-7-oraclejdk - export PATH=$JAVA_HOME/bin:$PATH -} - -function __sub_java8() { - export JAVA_HOME=/usr/lib/jvm/java-8-oraclejdk - export PATH=$JAVA_HOME/bin:$PATH -} - -function __sub_tools() { - export PATH=/opt/idea-iu15/bin:$PATH - export PATH=/opt/gwt-chromium/bin:$PATH - - export PATH=/opt/grails3/bin:$PATH - - export PATH=/opt/cern-scripts/bin:$PATH - - export TNS_ADMIN=/home/yfischer/.cache/tnsnames/admin_localhost - export JAVA_OPTS="-Doracle.net.tns_admin=$TNS_ADMIN" - export GRADLE_OPTS="-Doracle.net.tns_admin=$TNS_ADMIN" -} - -function __env_ideajava8() { - __sub_java8 - __sub_tools -} - -function __env_ideajava7() { - __sub_java7 - __sub_tools -} - -function __env_fwk24() { - __sub_java7 - - export PATH=/opt/idea-iu15/bin:$PATH - export PATH=/opt/gwt-chromium/bin:$PATH - export PATH=/opt/grails2.2.1/bin:$PATH - export PATH=/opt/cern-scripts/bin:$PATH - - export TNS_ADMIN=/home/yfischer/.cache/tnsnames/admin_localhost - export JAVA_OPTS="-Doracle.net.tns_admin=$TNS_ADMIN" - export GRADLE_OPTS="-Doracle.net.tns_admin=$TNS_ADMIN" -} +# Examples: +# +# function __env_ideajava8() { +# __activator oraclejdk8 idea-iu2016 groovy-bin-2.4.5 +# __activator gwt-chromium cern-scripts +# +# export TNS_ADMIN=/home/yfischer/.cache/tnsnames/admin_localhost +# export JAVA_OPTS="-Doracle.net.tns_admin=$TNS_ADMIN" +# export GRADLE_OPTS="-Doracle.net.tns_admin=$TNS_ADMIN" +# } +# +# function __env_fwk24() { +# __activator oraclejdk7 +# __activator gwt-chromium +# __activator idea-iu2016 +# __activator cern-scripts +# +# +# export PATH=/opt/grails2.2.1/bin:$PATH +# +# export TNS_ADMIN=/home/yfischer/.cache/tnsnames/admin_localhost +# export JAVA_OPTS="-Doracle.net.tns_admin=$TNS_ADMIN" +# export GRADLE_OPTS="-Doracle.net.tns_admin=$TNS_ADMIN" +# } |