From 4734902a62447140c2069a14ac3ea36e68ac8f3a Mon Sep 17 00:00:00 2001 From: epackorigan Date: Wed, 17 Jan 2018 16:36:08 -0800 Subject: [PATCH 1/2] making search_maint.sh path independent Tweaking the script to extract the path from the script location itself (and two dirs up). --- setup/search_maint.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/setup/search_maint.sh b/setup/search_maint.sh index 3810f65b..90b4a88f 100755 --- a/setup/search_maint.sh +++ b/setup/search_maint.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash -cd /usr/local/sal_install/sal -export PYTHONPATH=/usr/local/sal_install/sal/sal:$PYTHONPATH +SAL_MAINT=`dirname $0` +SAL_PATH=`(cd $SAL_MAINT/../.. && pwd)` +cd $SAL_PATH +export PYTHONPATH=$SAL_PATH/sal/sal:$PYTHONPATH export DJANGO_SETTINGS_MODULE='sal.settings' - -/usr/local/sal_install/sal_env/bin/python manage.py search_maintenance + +$SAL_PATH/sal_env/bin/python manage.py search_maintenance From ae0eb3af8ac1ae069ea3ce829d7c6783a66b6bec Mon Sep 17 00:00:00 2001 From: epackorigan Date: Wed, 17 Jan 2018 16:53:55 -0800 Subject: [PATCH 2/2] missing sal move to the right dir. --- setup/search_maint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/search_maint.sh b/setup/search_maint.sh index 90b4a88f..81258fb3 100755 --- a/setup/search_maint.sh +++ b/setup/search_maint.sh @@ -2,7 +2,7 @@ SAL_MAINT=`dirname $0` SAL_PATH=`(cd $SAL_MAINT/../.. && pwd)` -cd $SAL_PATH +cd $SAL_PATH/sal export PYTHONPATH=$SAL_PATH/sal/sal:$PYTHONPATH export DJANGO_SETTINGS_MODULE='sal.settings'