aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPjotr Prins2016-03-03 11:21:01 +0000
committerPjotr Prins2016-04-20 10:00:15 +0000
commita66858e99c2195d90a187899db6f4dd8966a0a2c (patch)
treee2c28be74e333614c78ef748ac8fdd165953effd /bin
parentc52bf79ba92d2a632637536a9ea607c22ef2d9bf (diff)
downloadgenenetwork2-a66858e99c2195d90a187899db6f4dd8966a0a2c.tar.gz
Show error when GENODIR is missing
Diffstat (limited to 'bin')
-rwxr-xr-xbin/genenetwork213
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