summaryrefslogtreecommitdiffstats
path: root/run
blob: 52f28c2ccf71dd63019dbccac667e4676fc3623a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env sh
set -e
export PYTHONPATH="$(dirname $0):$PYTHONPATH"
export PATH="$(dirname $0)/bin:$PATH"

python_best_version() {
  if [ -x "$(command -v python3)" ] &&
      python3 -c "import sys; sys.exit(not sys.version_info > (3, 5))"; then
    exec python3 "$@"
  else
    exec python "$@"
  fi
}

python_best_version -m "sshuttle" "$@"