diff options
Diffstat (limited to 'make/python_launcher')
-rwxr-xr-x | make/python_launcher | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/make/python_launcher b/make/python_launcher new file mode 100755 index 000000000..c2d9d8da0 --- /dev/null +++ b/make/python_launcher @@ -0,0 +1,25 @@ +#! /bin/sh +# + +inpath() +{ + IFS=: + for d in $PATH + do + if [ -x $d/$1 ]; then + return 0 + fi + done + return 1 +} + +for p in python2.7 python2.6 python2.5 python2.4 python2 python +do + if ( inpath $p ); then + exec $p "$@" + exit 0 + fi +done + +echo "ERROR: no suitable version of python found." +exit 1 |