about summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
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