Files
chromium_depot_tools/ninja
tony@chromium.org 13e7a6ae9c Add Linux 32-bit versions of Ninja
I compiled this on the WebKit Linux 32 bot and verified that it runs.
Review URL: https://codereview.chromium.org/11511007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@172191 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-10 23:54:03 +00:00

31 lines
788 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
machine=$(getconf LONG_BIT)
if [[ "$machine" = "64" ]]; then
exec "${THIS_DIR}/ninja-linux64" "$@"
elif [[ "$machine" = "32" ]]; then
exec "${THIS_DIR}/ninja-linux32" "$@"
else
echo Unknown architecture \($machine\) -- unable to run ninja.
exit 1
fi
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