diff options
author | Pjotr Prins | 2018-02-15 08:44:57 +0000 |
---|---|---|
committer | Pjotr Prins | 2018-02-15 08:44:57 +0000 |
commit | d636315ad629cb56ea3e697924160432f6132792 (patch) | |
tree | 476ed4196409a1dc918a41ca8d86400863eab875 /bin | |
parent | 2602be69f2869de376d1b9ced6131d880e9476c2 (diff) | |
parent | 1defefd05d0eb658fb5922fc755547261a5e914a (diff) | |
download | genenetwork2-d636315ad629cb56ea3e697924160432f6132792.tar.gz |
Fix conflict
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/genenetwork2 | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/bin/genenetwork2 b/bin/genenetwork2 index 8886e4bc..5438c1c0 100755 --- a/bin/genenetwork2 +++ b/bin/genenetwork2 @@ -95,6 +95,11 @@ export WQFLASK_OVERRIDES=$overrides # JSON echo WQFLASK_SETTINGS=$settings echo WQFLASK_OVERRIDES=$overrides +if [ -z $ELASTICSEARCH_PROFILE ]; then + echo -e "\033[1;33mWARNING: Elastic Search profile has not been set - use ELASTICSEARCH_PROFILE\033[0m"; +else + PYTHONPATH="$PYTHONPATH${PYTHONPATH:+:}$ELASTICSEARCH_PROFILE/lib/python2.7/site-packages" +fi if [ -z $GN2_PROFILE ] ; then echo "WARNING: GN2_PROFILE has not been set - you need the environment, so I hope you know what you are doing!" export GN2_PROFILE=$(dirname $(dirname $(which genenetwork2))) @@ -108,7 +113,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 + export PYTHONPATH="$GN2_PROFILE/lib/python2.7/site-packages${PYTHONPATH:+:}$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 @@ -124,7 +129,11 @@ else if [ -z $GEMMA_WRAPPER_COMMAND ]; then export GEMMA_WRAPPER_COMMAND="$GN2_PROFILE/bin/gemma-wrapper" fi - if [ ! -d $PYTHONPATH ] ; then echo "PYTHONPATH not valid "$PYTHONPATH ; exit 1 ; fi + while IFS=":" read -ra PPATH; do + for PPart in "${PPATH[@]}"; do + if [ ! -d $PPart ] ; then echo "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 if [ ! -d $GEM_PATH ] ; then echo "GEM_PATH not valid "$GEM_PATH ; exit 1 ; fi fi |