Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Unified Diff: ninja

Issue 11485007: ninja: Add a friendlier error message if no prebuilt binary is found. (Closed) Base URL: http://src.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: rebase again Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ninja
===================================================================
--- ninja (revision 172405)
+++ ninja (working copy)
@@ -7,12 +7,24 @@
OS="$(uname -s)"
THIS_DIR="$(dirname "${0}")"
+function print_help() {
+cat <<-EOF
+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
+}
+
case "$OS" in
Linux)
MACHINE=$(getconf LONG_BIT)
case "$MACHINE" in
32|64) exec "${THIS_DIR}/ninja-linux${MACHINE}" "$@";;
*) echo Unknown architecture \($MACHINE\) -- unable to run ninja.
+ print_help
exit 1;;
esac
;;
@@ -20,5 +32,6 @@
CYGWIN*) exec cmd.exe /c $(cygpath -t windows $0).exe "$@";;
MINGW32*) cmd.exe //c $0.exe "$@";;
*) echo "Unsupported OS ${OS}"
+ print_help
exit 1;;
esac
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698