summaryrefslogtreecommitdiffstats
path: root/run
diff options
context:
space:
mode:
authorvieira <vieira@yubo.be>2016-03-12 23:11:20 +0000
committerBrian May <brian@linuxpenguins.xyz>2016-03-16 16:16:53 +1100
commitefdb9b8f9468e4778ca1ae34509a5bf9315da66f (patch)
tree031cf47c271ff8d3675eb6ea384aa32931aa6951 /run
parent7875d1b97af605eeadad8b601ec97cc9cfb7212f (diff)
If 3.5 not available, try to fallback to 2.7
In situations where 2.7 is available and some unsupported 3.x is the system's default we should probably fallback to 2.7 instead of the default (that might be e.g. 3.4). This might fix #78.
Diffstat (limited to 'run')
-rwxr-xr-xrun2
1 files changed, 2 insertions, 0 deletions
diff --git a/run b/run
index 35bf4d0..1a33f7a 100755
--- a/run
+++ b/run
@@ -1,6 +1,8 @@
#!/bin/sh
if python3.5 -V 2>/dev/null; then
exec python3.5 -m "sshuttle" "$@"
+elif python2.7 -V 2>/dev/null; then
+ exec python2.7 -m "sshuttle" "$@"
else
exec python -m "sshuttle" "$@"
fi