Chromium Code Reviews| Index: ninja |
| =================================================================== |
| --- ninja (revision 172267) |
| +++ ninja (working copy) |
| @@ -7,6 +7,17 @@ |
| OS="$(uname -s)" |
| THIS_DIR="$(dirname "${0}")" |
| +function print_help() { |
| +cat <<-EOF |
|
M-A Ruel
2012/12/11 18:45:06
I only meant to have " cat << EOF" and the rest n
|
| +No prebuilt ninja binary was found for this system. |
| +Try building your own binary by doing: |
| + cd ~ |
| + git clone https://github.com/martine/ninja.git -b v1.0.0 |
| + ./ninja/bootstrap.py |
| +Then add ~/ninja/ to your PATH. |
| +EOF |
| +} |
| + |
| if [ "${OS}" = "Linux" ]; then |
| machine=$(getconf LONG_BIT) |
| if [[ "$machine" = "64" ]]; then |
| @@ -14,7 +25,8 @@ |
| elif [[ "$machine" = "32" ]]; then |
| exec "${THIS_DIR}/ninja-linux32" "$@" |
| else |
| - echo Unknown architecture \($machine\) -- unable to run ninja. |
| + echo "Unknown architecture ${machine}." |
| + print_help |
| exit 1 |
| fi |
| elif [ "${OS}" = "Darwin" ]; then |
| @@ -25,6 +37,7 @@ |
| cmd.exe //c $0.exe "$@" |
| else |
| echo "Unsupported OS ${OS}" |
| + print_help |
| exit 1 |
| fi |