diff options
author | Pjotr Prins | 2016-03-03 11:21:01 +0000 |
---|---|---|
committer | Pjotr Prins | 2016-04-20 10:00:15 +0000 |
commit | a66858e99c2195d90a187899db6f4dd8966a0a2c (patch) | |
tree | e2c28be74e333614c78ef748ac8fdd165953effd /bin | |
parent | c52bf79ba92d2a632637536a9ea607c22ef2d9bf (diff) | |
download | genenetwork2-a66858e99c2195d90a187899db6f4dd8966a0a2c.tar.gz |
Show error when GENODIR is missing
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/genenetwork2 | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/bin/genenetwork2 b/bin/genenetwork2 index a0a013fc..bbb2a19f 100755 --- a/bin/genenetwork2 +++ b/bin/genenetwork2 @@ -9,18 +9,19 @@ SCRIPT=$(readlink -f "$0") # Absolute path this script is in, thus /home/user/bin GN2_BASE_PATH=$(dirname $(dirname "$SCRIPT")) + +GN2_GUIX_PATH=$GN2_BASE_PATH/lib/python2.7/site-packages/genenetwork2-2.0-py2.7.egg +if [ -d $GN2_GUIX_PATH ]; then + GN2_BASE_PATH=$GN2_GUIX_PATH +fi echo $GN2_BASE_PATH # Handle settings parameter settings=$1 if [ -z $settings ]; then settings=$GN2_BASE_PATH/etc/default_settings.py ; fi if [ ! -e $settings ]; then - GN2_BASE_PATH=$GN2_BASE_PATH/lib/python2.7/site-packages/genenetwork2-2.0-py2.7.egg - settings=$GN2_BASE_PATH/etc/default_settings.py - if [ ! -e $settings ]; then - echo "ERROR: can not locate settings file - pass it in the command line" - exit 1 - fi + echo "ERROR: can not locate settings file - pass it in the command line" + exit 1 fi export WQFLASK_SETTINGS=$settings |