From ce9738be39855ac5d7ef3834d5347e31dd93c1fd Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Fri, 10 Aug 2018 14:53:13 -0400 Subject: [PATCH] Update .pyenv.sh to support non-sourced callings Signed-off-by: Alexander Scheel --- .pyenv.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 .pyenv.sh diff --git a/.pyenv.sh b/.pyenv.sh old mode 100644 new mode 100755 index a2b9da657a7..75474421b41 --- a/.pyenv.sh +++ b/.pyenv.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # This script sets the PYTHONPATH environment variable for the user, without # overriding their existing path. This allows them to directly execute scripts @@ -9,7 +9,7 @@ # $ source ../relative/or/absolute/path/to/.pyenv.sh # In which case, the user can then proceed to use any script as they wish. # Otherwise, it can be executed as: -# $ `../path/to/.pyenv.sh` python2 utils/some_script.py +# $ PYTHONPATH=`.../path/to/.pyenv.sh` .../path/to/utils/some_script.py # In which case, the changes to $PYTHONPATH will not persist past this command. @@ -27,5 +27,5 @@ if [ "x$PYTHONPATH" != "x" ]; then newpath="$newpath:$PYTHONPATH" fi -echo "PYTHONPATH=$newpath" +echo "$newpath" export PYTHONPATH="$newpath"