From 4801ae6627ed9feae743bab0f93ed523f5d7d309 Mon Sep 17 00:00:00 2001 From: Brian May Date: Tue, 30 Aug 2016 19:03:46 +1000 Subject: [PATCH] Support using run from different directory --- run | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/run b/run index 8127acd..ec2d3f0 100755 --- a/run +++ b/run @@ -1,6 +1,7 @@ #!/bin/sh -./setup.py --version > /dev/null -export PYTHONPATH=$PWD:$PYTHONPATH +source_dir="$(dirname $0)" +(cd "$source_dir" && "$source_dir/setup.py" --version > /dev/null) +export PYTHONPATH="$source_dir:$PYTHONPATH" if python3.5 -V >/dev/null 2>&1; then exec python3.5 -m "sshuttle" "$@" elif python2.7 -V >/dev/null 2>&1; then