summaryrefslogtreecommitdiff
path: root/packages/cern-scripts/resources/lib
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2016-02-27 15:58:12 +0100
committerYves Fischer <yvesf-git@xapek.org>2016-02-27 15:58:12 +0100
commita307e0474e78c51590aeac95dbc5587a87ef6501 (patch)
treec5c7ca86b0b86704a4c1adc588e7ce249826e98f /packages/cern-scripts/resources/lib
parent77955935e9549a847ae7e0d78819f090d429fdb6 (diff)
downloaddebian-packages-a307e0474e78c51590aeac95dbc5587a87ef6501.tar.gz
debian-packages-a307e0474e78c51590aeac95dbc5587a87ef6501.zip
refactor scripts packages
Diffstat (limited to 'packages/cern-scripts/resources/lib')
-rw-r--r--packages/cern-scripts/resources/lib/activate.inc.sh68
-rw-r--r--packages/cern-scripts/resources/lib/aisadm-fingerprint5
-rw-r--r--packages/cern-scripts/resources/lib/environments.inc.sh46
3 files changed, 0 insertions, 119 deletions
diff --git a/packages/cern-scripts/resources/lib/activate.inc.sh b/packages/cern-scripts/resources/lib/activate.inc.sh
deleted file mode 100644
index 79bed6b..0000000
--- a/packages/cern-scripts/resources/lib/activate.inc.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-
-# non-interactive activate
- __activate_env() {
- for func in $(typeset -F | cut -f 3 -d ' ' | grep -E '^__env_'); do
- if [[ "$func" == "__env_$1" ]]; then
- $func
- echo "Activated $1"
- return 0
- fi
- done
- echo "Error: Environment not found $1" >&2
- return 1
-}
-
-# print all defined envs
-list_envs() {
- for env in $(typeset -F | sed -n -e 's/^declare -f __env_//p'); do
- active=false
- for env_active in $ENV_ACTIVE; do
- if [ "$env_active" == "$env" ]; then
- active=true
- fi
- done
- if $active; then
- echo -n "${env}* "
- else
- echo -n "$env "
- fi
- done
- echo ""
-}
-
-plain_list_envs() {
- typeset -F | sed -n -e 's/^declare -f __env_//p'
-}
-
-# Interactive activate
-activate() {
- err=false
- for env in $*; do
- if ! typeset -F | grep -q -E "^declare -f __env_${env}$"; then
- echo "Environment not defined: $env"
- err=true
- fi
- done
- if $err; then
- return 1
- fi
-
- for env in $*; do
- if typeset -F | grep -q -E "^declare -f __env_${env}$"; then
- export ENV_ACTIVE="$ENV_ACTIVE${ENV_ACTIVE:+ }$env"
- __env_${env}
- fi
- done
- echo "Active: $ENV_ACTIVE"
-}
-
-# initialization
-for env_request in $ENV_ACTIVE; do
- __activate_env $env_request
-done
-
-# bash-completion for `activate'
-_activate() {
- _init_completion -s || return
- COMPREPLY=( $(compgen -W "$(list_envs)" -- $cur) )
-} && complete -F _activate activate
diff --git a/packages/cern-scripts/resources/lib/aisadm-fingerprint b/packages/cern-scripts/resources/lib/aisadm-fingerprint
deleted file mode 100644
index d913b51..0000000
--- a/packages/cern-scripts/resources/lib/aisadm-fingerprint
+++ /dev/null
@@ -1,5 +0,0 @@
-# Host aisadm found: line 139 type RSA
-|1|yTV5M0N1SGVLpMKcu6+OfkwvC4o=|60gdtP9Qcp26ITFRkvKHIr/UMic= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA4bg2L316l/5zs7S7hE69fev4tWYczJy/Yf2AI1rhG5j1+EXZKMnCUkm1bpZUNu8g2fzg/P6wPSTQyZmc7ieQaKoiz69ZQ2mr+bIi2ET+50DDO9ZzrVFnKeOzs669fSfWp3Y7o8ubTRx5t/nLrMTxSDUQxXitk1UV5mosE5yzlJ665zlEE8+rVsqhhBC7bfg2lJR5HptxpCR9kVSyLkHydEXC8WltW06bpBHEuvKWAkAMMfftOHowWLCEslOFUirpjR65uqK+da9v3SfUvOYF8JZCrw7yDutyx5bzqFVS3N39T/7QPGJLYRJip1DPh8OvtPOPLLbdPY76NrodmRn9aw==
-# Host aisadm.cern.ch found: line 140 type RSA
-|1|3Dv9PqxtXlsVD96Sc4b/l/XLc10=|hsaJh8u7r0/1olKy6ihcAQuOSfc= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA4bg2L316l/5zs7S7hE69fev4tWYczJy/Yf2AI1rhG5j1+EXZKMnCUkm1bpZUNu8g2fzg/P6wPSTQyZmc7ieQaKoiz69ZQ2mr+bIi2ET+50DDO9ZzrVFnKeOzs669fSfWp3Y7o8ubTRx5t/nLrMTxSDUQxXitk1UV5mosE5yzlJ665zlEE8+rVsqhhBC7bfg2lJR5HptxpCR9kVSyLkHydEXC8WltW06bpBHEuvKWAkAMMfftOHowWLCEslOFUirpjR65uqK+da9v3SfUvOYF8JZCrw7yDutyx5bzqFVS3N39T/7QPGJLYRJip1DPh8OvtPOPLLbdPY76NrodmRn9aw==
-|1|dK7Pv86oW5bQku5Of07RsXiG/Ik=|nn2+VzNvPlFlokTOiShBTSLlqi0= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA4bg2L316l/5zs7S7hE69fev4tWYczJy/Yf2AI1rhG5j1+EXZKMnCUkm1bpZUNu8g2fzg/P6wPSTQyZmc7ieQaKoiz69ZQ2mr+bIi2ET+50DDO9ZzrVFnKeOzs669fSfWp3Y7o8ubTRx5t/nLrMTxSDUQxXitk1UV5mosE5yzlJ665zlEE8+rVsqhhBC7bfg2lJR5HptxpCR9kVSyLkHydEXC8WltW06bpBHEuvKWAkAMMfftOHowWLCEslOFUirpjR65uqK+da9v3SfUvOYF8JZCrw7yDutyx5bzqFVS3N39T/7QPGJLYRJip1DPh8OvtPOPLLbdPY76NrodmRn9aw==
diff --git a/packages/cern-scripts/resources/lib/environments.inc.sh b/packages/cern-scripts/resources/lib/environments.inc.sh
deleted file mode 100644
index 8960d95..0000000
--- a/packages/cern-scripts/resources/lib/environments.inc.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-
-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"
-}