summaryrefslogtreecommitdiffstats
path: root/make/python_launcher
blob: c2d9d8da0a34096c623160b4f2e48a5a73b0c43d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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