#!/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}")" case "$OS" in Linux) MACHINE=$(getconf LONG_BIT) case "$MACHINE" in 32|64) exec "${THIS_DIR}/ninja-linux${MACHINE}" "$@";; *) echo Unknown architecture \($MACHINE\) -- unable to run ninja. exit 1;; esac ;; Darwin) exec "${THIS_DIR}/ninja-mac" "$@";; CYGWIN*) exec cmd.exe /c $(cygpath -t windows $0).exe "$@";; MINGW32*) cmd.exe //c $0.exe "$@";; *) echo "Unsupported OS ${OS}" exit 1;; esac