OLD | NEW |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2012 Google Inc. All rights reserved. | 3 # Copyright (c) 2012 Google Inc. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 OS="$(uname -s)" | 7 OS="$(uname -s)" |
8 THIS_DIR="$(dirname "${0}")" | 8 THIS_DIR="$(dirname "${0}")" |
9 | 9 |
10 if [ "${OS}" = "Linux" ]; then | 10 if [ "${OS}" = "Linux" ]; then |
11 exec "${THIS_DIR}/ninja-linux64" "$@" | 11 if [ -n "`uname -a | grep x86_64`" ]; then |
Nico
2012/12/10 20:15:29
Does this work with a 64bit kernel and 32bit userl
szager1
2012/12/10 20:23:31
Not sure I understand the desired effect here. On
| |
12 exec "${THIS_DIR}/ninja-linux64" "$@" | |
13 else | |
14 exec "${THIS_DIR}/ninja-linux32" "$@" | |
15 fi | |
12 elif [ "${OS}" = "Darwin" ]; then | 16 elif [ "${OS}" = "Darwin" ]; then |
13 exec "${THIS_DIR}/ninja-mac" "$@" | 17 exec "${THIS_DIR}/ninja-mac" "$@" |
14 elif [[ ${OS} == CYGWIN* ]]; then | 18 elif [[ ${OS} == CYGWIN* ]]; then |
15 exec cmd.exe /c `cygpath -t windows $0`.exe "$@" | 19 exec cmd.exe /c `cygpath -t windows $0`.exe "$@" |
16 elif [[ ${OS} == MINGW32* ]]; then | 20 elif [[ ${OS} == MINGW32* ]]; then |
17 cmd.exe //c $0.exe "$@" | 21 cmd.exe //c $0.exe "$@" |
18 else | 22 else |
19 echo "Unsupported OS ${OS}" | 23 echo "Unsupported OS ${OS}" |
20 exit 1 | 24 exit 1 |
21 fi | 25 fi |
22 | 26 |
OLD | NEW |