sshuttle/run

18 lines
417 B
Plaintext
Raw Normal View History

#!/usr/bin/env sh
2017-10-21 03:03:35 +02:00
set -e
export PYTHONPATH="$(dirname $0):$PYTHONPATH"
export PATH="$(dirname $0)/bin:$PATH"
python_best_version() {
2017-10-21 02:57:05 +02:00
if [ -x "$(command -v python3)" ] &&
python3 -c "import sys; sys.exit(not sys.version_info > (3, 5))"; then
exec python3 "$@"
elif [ -x "$(command -v python2.7)" ]; then
exec python2.7 "$@"
else
exec python "$@"
fi
}
python_best_version -m "sshuttle" "$@"