Skip to content

Commit

Permalink
Update .pyenv.sh to support non-sourced callings
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
  • Loading branch information
cipherboy committed Aug 10, 2018
1 parent a98a8e8 commit ce9738b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .pyenv.sh 100644 → 100755
@@ -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
Expand All @@ -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.


Expand All @@ -27,5 +27,5 @@ if [ "x$PYTHONPATH" != "x" ]; then
newpath="$newpath:$PYTHONPATH"
fi

echo "PYTHONPATH=$newpath"
echo "$newpath"
export PYTHONPATH="$newpath"

0 comments on commit ce9738b

Please sign in to comment.