From c7bf35f03068ca135da27c9c1a4515e7f2f93615 Mon Sep 17 00:00:00 2001 From: "scottmg@chromium.org" Date: Fri, 13 Apr 2012 20:17:29 +0000 Subject: [PATCH] Add support for launching windows ninja from cygwin. Shell through to the .bat to make sure the environment is correctly set up. Not sure if there's a better uname to check? Review URL: https://chromiumcodereview.appspot.com/10024045 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@132252 0039d316-1c4b-4281-b951-d872f2087c98 --- ninja | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ninja b/ninja index 836ea4b65..1efff0d25 100755 --- a/ninja +++ b/ninja @@ -1,11 +1,17 @@ #!/bin/bash +# Copyright (c) 2012 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + OS="$(uname -s)" if [ "${OS}" = "Linux" ]; then exec ninja-linux64 "$@" elif [ "${OS}" = "Darwin" ]; then exec ninja-mac "$@" +elif [[ ${OS} == CYGWIN* ]]; then + exec cmd.exe /c `cygpath -t windows $0`.bat "$@" else echo "Unsupported OS ${OS}" exit 1