aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMuriithi Frederick Muriuki2018-03-31 14:45:17 +0300
committerMuriithi Frederick Muriuki2018-03-31 14:45:17 +0300
commit31747256e466456cc88aac60780836a6534f18cd (patch)
treea7b371e4ec217ffb37594e15f5e603ae28511dc2 /bin
parentcfce6d80be4fb38573c37d1943db2687d54cf2fc (diff)
parent5424741a4a126bfd5f04df7cbcdc30b4e1376b86 (diff)
downloadgenenetwork2-31747256e466456cc88aac60780836a6534f18cd.tar.gz
Merge branch 'testing' of https://github.com/genenetwork/genenetwork2 into testing
* Fix conflicts
Diffstat (limited to 'bin')
-rwxr-xr-xbin/genenetwork237
1 files changed, 17 insertions, 20 deletions
diff --git a/bin/genenetwork2 b/bin/genenetwork2
index 2a83a1cd..3f06e7f9 100755
--- a/bin/genenetwork2
+++ b/bin/genenetwork2
@@ -68,32 +68,29 @@ if [ "$1" = "-c" -o "$1" = "-gunicorn" ]; then
echo "Can not use $1 switch without default settings file"
exit 1
fi
-# Handle settings parameter (can be .py or .json)
-if [ ! -z $1 ]; then
- settings=$(realpath "$1")
- if [ ! -e $settings ]; then
- settings=$GN2_BASE_DIR/etc/default_settings.py
- else
- shift
- fi
-fi
-ext="${settings##*.}"
-if [ "$ext" = "json" -o "$ext" = "JSON" ]; then
- overrides=$settings
+settings=$1
+if [ -z $settings ]; then
+ settings=$GN2_BASE_DIR/etc/default_settings.py
else
- echo $settings
+ shift
fi
+settings=$(realpath $settings)
+
+# ext="${settings##*.}"
+# if [ "$ext" = "json" -o "$ext" = "JSON" ]; then
+# overrides=$settings
+# else
+# echo $settings
+# fi
if [ ! -e $settings ]; then
echo "ERROR: can not locate settings file - pass it in the command line"
exit 1
fi
-export WQFLASK_SETTINGS=$settings # Python
-export WQFLASK_OVERRIDES=$overrides # JSON
-echo WQFLASK_SETTINGS=$settings
-echo WQFLASK_OVERRIDES=$overrides
+export GN2_SETTINGS=$settings # Python
+echo GN2_SETTINGS=$settings
# This is a temporary hack to inject ES - should have added python2-elasticsearch package to guix instead
# if [ -z $ELASTICSEARCH_PROFILE ]; then
@@ -115,7 +112,7 @@ if [ -z $GN2_PROFILE ]; then
read -p "PRESS [ENTER] TO CONTINUE..."
else
export PATH=$GN2_PROFILE/bin:$PATH
- export PYTHONPATH="$GN2_PROFILE/lib/python2.7/site-packages${PYTHONPATH:+:}$PYTHONPATH"
+ export PYTHONPATH="$GN2_PROFILE/lib/python2.7/site-packages" # never inject another PYTHONPATH!!
export R_LIBS_SITE=$GN2_PROFILE/site-library
export GEM_PATH=$GN2_PROFILE/lib/ruby/gems/2.4.0
export JS_GUIX_PATH=$GN2_PROFILE/share/genenetwork2/javascript
@@ -132,8 +129,8 @@ else
export GEMMA_WRAPPER_COMMAND="$GN2_PROFILE/bin/gemma-wrapper"
fi
while IFS=":" read -ra PPATH; do
- for PPart in "${PPATH[@]}"; do
- if [ ! -d $PPart ] ; then echo "PYTHONPATH not valid "$PYTHONPATH ; exit 1 ; fi
+ for PPART in "${PPATH[@]}"; do
+ if [ ! -d $PPART ] ; then echo "$PPART in PYTHONPATH not valid $PYTHONPATH" ; exit 1 ; fi
done
done <<< "$PYTHONPATH"
if [ ! -d $R_LIBS_SITE ] ; then echo "R_LIBS_SITE not valid "$R_LIBS_SITE ; exit 1 ; fi