forked from sbc100/native_client
-
Notifications
You must be signed in to change notification settings - Fork 1
/
scons
executable file
·27 lines (22 loc) · 890 Bytes
/
scons
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# Copyright (c) 2011 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
readonly SCRIPT_DIR="$(dirname "$0")"
readonly SCRIPT_DIR_ABS="$(cd "${SCRIPT_DIR}" ; pwd)"
# Use the batch file as an entry point if on cygwin.
if [ "x${OSTYPE}" = "xcygwin" ]; then
# Use extended globbing (cygwin should always have it).
shopt -s extglob
# Filter out cygwin python (everything under /usr or /bin, or *cygwin*).
export PATH=${PATH/#\/bin*([^:])/}
export PATH=${PATH//:\/bin*([^:])/}
export PATH=${PATH/#\/usr*([^:])/}
export PATH=${PATH//:\/usr*([^:])/}
export PATH=${PATH/#*([^:])cygwin*([^:])/}
export PATH=${PATH//:*([^:])cygwin*([^:])/}
"${SCRIPT_DIR_ABS}/scons.bat" "$@"
exit
fi
readonly BASE_SCRIPT="${SCRIPT_DIR_ABS}/scons.py"
python "${BASE_SCRIPT}" "$@"