2017-10-21 00:52:06 +02:00
|
|
|
#!/usr/bin/env sh
|
2017-10-21 03:03:35 +02:00
|
|
|
set -e
|
2017-10-21 00:52:06 +02:00
|
|
|
export PYTHONPATH="$(dirname $0):$PYTHONPATH"
|
2019-12-12 22:15:31 +01:00
|
|
|
export PATH="$(dirname $0)/bin:$PATH"
|
2017-10-21 00:52:06 +02:00
|
|
|
|
|
|
|
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 "$@"
|
2017-10-21 00:52:06 +02:00
|
|
|
elif [ -x "$(command -v python2.7)" ]; then
|
|
|
|
exec python2.7 "$@"
|
|
|
|
else
|
|
|
|
exec python "$@"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
python_best_version -m "sshuttle" "$@"
|