Mercurial > hg > graal-compiler
comparison mxtool/mx @ 3723:6c5f528c7aac
Added a copy of the mxtool to repo.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 16 Dec 2011 16:46:33 +0100 |
parents | |
children | 3e749481e445 |
comparison
equal
deleted
inserted
replaced
3722:7c5524a4e86e | 3723:6c5f528c7aac |
---|---|
1 #!/bin/bash | |
2 # | |
3 # ---------------------------------------------------------------------------------------------------- | |
4 # | |
5 # Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. | |
6 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
7 # | |
8 # This code is free software; you can redistribute it and/or modify it | |
9 # under the terms of the GNU General Public License version 2 only, as | |
10 # published by the Free Software Foundation. | |
11 # | |
12 # This code is distributed in the hope that it will be useful, but WITHOUT | |
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 # version 2 for more details (a copy is included in the LICENSE file that | |
16 # accompanied this code). | |
17 # | |
18 # You should have received a copy of the GNU General Public License version | |
19 # 2 along with this work; if not, write to the Free Software Foundation, | |
20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
21 # | |
22 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
23 # or visit www.oracle.com if you need additional information or have any | |
24 # questions. | |
25 # | |
26 # ---------------------------------------------------------------------------------------------------- | |
27 | |
28 dir=`/bin/pwd` | |
29 | |
30 # Resolve location of this script so that mx.py can be found in the same directory | |
31 source="${BASH_SOURCE[0]}" | |
32 while [ -h "$source" ] ; do source="$(readlink "$source")"; done | |
33 dir="$( cd -P "$( dirname "$source" )" && pwd )" | |
34 | |
35 if [ ! -f "$dir/mx.py" ]; then | |
36 echo "Cannot find mx.py in $dir" | |
37 exit 1 | |
38 fi | |
39 | |
40 python <<END | |
41 import sys | |
42 major, minor, micro, _, _ = sys.version_info | |
43 if major != 2 or minor != 7: | |
44 raise SystemExit('The mx.py script requires Python 2.7, not {0}.{1}.{2}'.format(major, minor, micro)) | |
45 END | |
46 if [ $? -eq 0 ]; then | |
47 exec python "$dir/mx.py" "$@" | |
48 fi | |
49 |