瀏覽代碼

Find CHUTNEY_PATH based on the chutney script's path

teor 8 年之前
父節點
當前提交
42c7b051ff
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      chutney

+ 5 - 0
chutney

@@ -4,6 +4,11 @@ set -o errexit
 set -o nounset
 
 export PYTHONPATH="$(dirname "${0}")/lib:$(dirname "${0}")/scripts:${PYTHONPATH-}"
+# make a last-ditch effort to set CHUTNEY_PATH based on this script's location
+if ! test "${CHUTNEY_PATH+y}"
+then
+    export CHUTNEY_PATH="`dirname $0`"
+fi
 
 binaries="python2 python"