You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			31 lines
		
	
	
		
			788 B
		
	
	
	
		
			Bash
		
	
			
		
		
	
	
			31 lines
		
	
	
		
			788 B
		
	
	
	
		
			Bash
		
	
#!/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
 | 
						|
 |