Mercurial > repos > ric > test2
comparison galaxy-tools/biobank/tools/launcher.sh @ 0:ba6cf6ede027 draft default tip
Uploaded
| author | ric |
|---|---|
| date | Wed, 28 Sep 2016 06:03:30 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:ba6cf6ede027 |
|---|---|
| 1 #!/bin/sh | |
| 2 | |
| 3 CMD="" | |
| 4 PYTH_PATH="PYTHONPATH=/SHARE/USERFS/els7/users/galaxy/develop/usr-cluster/lib/p\ | |
| 5 ython2.7/site-packages/:/SHARE/USERFS/els7/users/biobank/lib/" | |
| 6 runner="$(dirname ${BASH_SOURCE[0]})/" | |
| 7 until [ -z $1 ] | |
| 8 do | |
| 9 | |
| 10 opt_host='--host=' | |
| 11 opt_user='--user=' | |
| 12 opt_passwd='--passwd=' | |
| 13 opt_interpreter='--interpreter=' | |
| 14 opt_runner='--runner=' | |
| 15 if [[ $1 == $opt_host* ]]; then | |
| 16 host=`echo $1 | cut -d '=' -f2 | cut -d '.' -f1` | |
| 17 if [ -z $host -o $host == 'None' ]; then | |
| 18 echo 'ERROR. Missing omero host parameter. Please, set Omero Host in your user preferences' > /dev/null >&2 | |
| 19 exit -1 | |
| 20 fi | |
| 21 PYTH_PATH+=$host | |
| 22 HOST=`echo $1 | cut -d '=' -f2` | |
| 23 CMD+=' '$1 | |
| 24 elif [[ $1 == $opt_user* ]]; then | |
| 25 user=`echo $1 | cut -d '=' -f2` | |
| 26 if [ -z $user -o $user == 'None' ]; then | |
| 27 echo 'ERROR. Missing omero user parameter. Please, set Omero User in your user preferences' > /dev/null >&2 | |
| 28 exit -1 | |
| 29 fi | |
| 30 CMD+=' '$1 | |
| 31 elif [[ $1 == $opt_passwd* ]]; then | |
| 32 passwd=`echo $1 | cut -d '=' -f2` | |
| 33 if [ -z $passwd -o $passwd == 'None' ]; then | |
| 34 echo 'ERROR. Missing omero password parameter. Please, set Omero Password in your user preferences' > /dev/null >&2 | |
| 35 exit -1 | |
| 36 fi | |
| 37 CMD+=' '$1 | |
| 38 elif [[ $1 == $opt_runner* ]]; then | |
| 39 runner+=`echo $1 | cut -d '=' -f2` | |
| 40 elif [[ $1 == $opt_interpreter* ]]; then | |
| 41 interpreter=`echo $1 | cut -d '=' -f2` | |
| 42 else | |
| 43 CMD+=' '$1 | |
| 44 fi | |
| 45 shift | |
| 46 done | |
| 47 export $PYTH_PATH/:$PYTHONPATH | |
| 48 profile="/SHARE/USERFS/els7/users/biobank/lib/${HOST}.biobank.profile" | |
| 49 if [ -f $profile ]; then | |
| 50 source $profile | |
| 51 CMD=$interpreter' '$runner$CMD | |
| 52 $CMD | |
| 53 else | |
| 54 echo "ERROR. Biobank profile file doesn't exist. Please, check Omero Host in your user preferences" > /dev/null >&2 | |
| 55 exit -1 | |
| 56 fi |
