From fdf5ca83788abd1cea5d69b38b12f84d3b2ca2dc Mon Sep 17 00:00:00 2001 From: "thakis@chromium.org" Date: Thu, 1 Nov 2012 21:50:26 +0000 Subject: [PATCH] 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 --- ninja | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ninja b/ninja index eda784284c..a14363a1ca 100755 --- a/ninja +++ b/ninja @@ -5,11 +5,12 @@ # found in the LICENSE file. OS="$(uname -s)" +THIS_DIR="$(dirname "${0}")" if [ "${OS}" = "Linux" ]; then - exec ninja-linux64 "$@" + exec "${THIS_DIR}/ninja-linux64" "$@" elif [ "${OS}" = "Darwin" ]; then - exec ninja-mac "$@" + exec "${THIS_DIR}/ninja-mac" "$@" elif [[ ${OS} == CYGWIN* ]]; then exec cmd.exe /c `cygpath -t windows $0`.exe "$@" elif [[ ${OS} == MINGW32* ]]; then