Files
chromium_depot_tools/ninja
thakis@chromium.org fdf5ca8378 ninja: Don't assume that depot_tools is in PATH.
TEST=`~/src/depot_tools/ninja --version` works when depot_tools isn't in PATH

Review URL: https://chromiumcodereview.appspot.com/11366044

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@165510 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-01 21:50:26 +00:00

23 lines
552 B
Bash
Executable File

#!/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)"
THIS_DIR="$(dirname "${0}")"
if [ "${OS}" = "Linux" ]; then
exec "${THIS_DIR}/ninja-linux64" "$@"
elif [ "${OS}" = "Darwin" ]; then
exec "${THIS_DIR}/ninja-mac" "$@"
elif [[ ${OS} == CYGWIN* ]]; then
exec cmd.exe /c `cygpath -t windows $0`.exe "$@"
elif [[ ${OS} == MINGW32* ]]; then
cmd.exe //c $0.exe "$@"
else
echo "Unsupported OS ${OS}"
exit 1
fi