Support using run from different directory

This commit is contained in:
Brian May 2016-08-30 19:03:46 +10:00
parent f57ad356b9
commit 4801ae6627

5
run
View File

@ -1,6 +1,7 @@
#!/bin/sh #!/bin/sh
./setup.py --version > /dev/null source_dir="$(dirname $0)"
export PYTHONPATH=$PWD:$PYTHONPATH (cd "$source_dir" && "$source_dir/setup.py" --version > /dev/null)
export PYTHONPATH="$source_dir:$PYTHONPATH"
if python3.5 -V >/dev/null 2>&1; then if python3.5 -V >/dev/null 2>&1; then
exec python3.5 -m "sshuttle" "$@" exec python3.5 -m "sshuttle" "$@"
elif python2.7 -V >/dev/null 2>&1; then elif python2.7 -V >/dev/null 2>&1; then