Chromium Code Reviews| Index: ninja |
| =================================================================== |
| --- ninja (revision 171134) |
| +++ ninja (working copy) |
| @@ -7,8 +7,26 @@ |
| OS="$(uname -s)" |
| THIS_DIR="$(dirname "${0}")" |
| +function print_help() { |
| + echo "No prebuilt ninja binary was found for this system." |
|
Lei Zhang
2012/12/10 20:34:45
you can also:
cat << __EOF
here is
my
message
__E
Nico
2012/12/11 04:49:34
Done.
|
| + echo "Try building your own binary by doing:" |
| + echo " cd ~" |
| + echo " git clone https://github.com/martine/ninja.git" |
| + echo " cd ninja" |
| + echo " git checkout v1.0.0" |
| + echo " ./bootstrap.py" |
| + echo "Then add ~/ninja/ to your PATH." |
| +} |
| + |
| if [ "${OS}" = "Linux" ]; then |
| - exec "${THIS_DIR}/ninja-linux64" "$@" |
| + machine=$(getconf LONG_BIT) |
| + if [ "$machine" = "64" ]; then |
| + exec "${THIS_DIR}/ninja-linux64" "$@" |
| + else |
| + echo "Unsupported machine ${machine}" |
| + print_help |
| + exit 1 |
| + fi |
| elif [ "${OS}" = "Darwin" ]; then |
| exec "${THIS_DIR}/ninja-mac" "$@" |
| elif [[ ${OS} == CYGWIN* ]]; then |
| @@ -17,6 +35,6 @@ |
| cmd.exe //c $0.exe "$@" |
| else |
| echo "Unsupported OS ${OS}" |
| + print_help |
| exit 1 |
| fi |
| - |