Mercurial > hg > graal-jvmci-8
comparison pytools/gl @ 3689:9878f53ebe09
Added helper script for gl.py.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 22 Nov 2011 11:48:41 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3688:ff6582ef15b3 | 3689:9878f53ebe09 |
---|---|
1 #!/bin/bash | |
2 | |
3 dir=`/bin/pwd` | |
4 while [ ! \( -f "$dir/pytools/gl.py" -a -f "$dir/GRAAL_README" \) ]; do | |
5 dir="$(dirname $dir)" | |
6 if [ "$dir" = "/" ]; then | |
7 echo "Cannot find 'pytools/gl.py' in `/bin/pwd` or any of it's parents" | |
8 exit 1 | |
9 fi | |
10 done | |
11 | |
12 python <<END | |
13 import sys | |
14 major, minor, micro, _, _ = sys.version_info | |
15 if major != 2 or minor != 7: | |
16 raise SystemExit('The gl.py script requires Python 2.7, not {0}.{1}.{2}'.format(major, minor, micro)) | |
17 END | |
18 if [ $? -eq 0 ]; then | |
19 exec python "$dir/pytools/gl.py" "$@" | |
20 fi | |
21 |