Chromium Code Reviews| Index: ninja | 
| =================================================================== | 
| --- ninja (revision 172267) | 
| +++ ninja (working copy) | 
| @@ -7,6 +7,19 @@ | 
| OS="$(uname -s)" | 
| THIS_DIR="$(dirname "${0}")" | 
| +function print_help() { | 
| +cat << EOF | 
| 
 
M-A Ruel
2012/12/11 14:24:55
In theory you'd want this line to be indented.
 
Nico
2012/12/11 18:36:54
I could use <<- for a here document that strips le
 
 | 
| +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 | 
| 
 
M-A Ruel
2012/12/11 14:24:55
git clone https://github.com/martine/ninja.git -b
 
Nico
2012/12/11 18:36:54
Done.
 
 | 
| + cd ninja | 
| 
 
M-A Ruel
2012/12/11 14:24:55
Does ./ninja/bootstrap.py works? If so, you'd save
 
Nico
2012/12/11 18:36:54
Done.
 
 | 
| + git checkout v1.0.0 | 
| + ./bootstrap.py | 
| +Then add ~/ninja/ to your PATH. | 
| +EOF | 
| +} | 
| + | 
| if [ "${OS}" = "Linux" ]; then | 
| machine=$(getconf LONG_BIT) | 
| if [[ "$machine" = "64" ]]; then | 
| @@ -14,7 +27,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 +39,7 @@ | 
| cmd.exe //c $0.exe "$@" | 
| else | 
| echo "Unsupported OS ${OS}" | 
| + print_help | 
| exit 1 | 
| fi |