2 # Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
6 readonly SCRIPT_DIR="$(dirname "$0")"
7 readonly SCRIPT_DIR_ABS="$(cd "${SCRIPT_DIR}" ; pwd)"
9 # Use the batch file as an entry point if on cygwin.
10 if [ "x${OSTYPE}" = "xcygwin" ]; then
11 # Use extended globbing (cygwin should always have it).
13 # Filter out cygwin python (everything under /usr or /bin, or *cygwin*).
14 export PATH=${PATH/#\/bin*([^:])/}
15 export PATH=${PATH//:\/bin*([^:])/}
16 export PATH=${PATH/#\/usr*([^:])/}
17 export PATH=${PATH//:\/usr*([^:])/}
18 export PATH=${PATH/#*([^:])cygwin*([^:])/}
19 export PATH=${PATH//:*([^:])cygwin*([^:])/}
20 "${SCRIPT_DIR_ABS}/scons.bat" "$@"
24 readonly BASE_SCRIPT="${SCRIPT_DIR_ABS}/scons.py"
26 python "${BASE_SCRIPT}" "$@"