Rename ninja.exe to ninja-win.exe
Git for Cygwin can't handle having a file called ninja in the same
folder as one called ninja.exe. Rename ninja.exe to ninja-win.exe
Add ninja.bat to call into ninja-win.exe, so that Windows clients
can continue to just call 'ninja'
Change-Id: I58b02af1e1e0f5be476845fc1e9cd19d99b60496
diff --git a/ninja b/ninja
index a337045..33ef701 100755
--- a/ninja
+++ b/ninja
@@ -35,8 +35,8 @@
esac
;;
Darwin) exec "${THIS_DIR}/ninja-mac" "$@";;
- CYGWIN*) exec cmd.exe /c $(cygpath -t windows $0).exe "$@";;
- MINGW32*) cmd.exe //c $0.exe "$@";;
+ CYGWIN*) exec cmd.exe /c $(cygpath -t windows $0-win).exe "$@";;
+ MINGW32*) cmd.exe //c $0-win.exe "$@";;
*) echo "Unsupported OS ${OS}"
print_help
exit 1;;
diff --git a/ninja.exe b/ninja-win.exe
similarity index 100%
rename from ninja.exe
rename to ninja-win.exe
Binary files differ
diff --git a/ninja.bat b/ninja.bat
new file mode 100644
index 0000000..8dc49d2
--- /dev/null
+++ b/ninja.bat
@@ -0,0 +1,5 @@
+@echo off
+setlocal
+:: This is required with cygwin only.
+PATH=%~dp0;%PATH%
+"%~dp0ninja-win.exe" %*