From a66858e99c2195d90a187899db6f4dd8966a0a2c Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Thu, 3 Mar 2016 11:21:01 +0000 Subject: Show error when GENODIR is missing --- bin/genenetwork2 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'bin') 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 -- cgit v1.2.3