2 :: Copyright (c) 2011 The Native Client Authors. All rights reserved.
\r
3 :: Use of this source code is governed by a BSD-style license that can be
\r
4 :: found in the LICENSE file.
\r
8 :: If this batch file is run directly thru cygwin, we will get the wrong
\r
9 :: version of python. To avoid this, if we detect cygwin, we need to then
\r
10 :: invoke the shell script which will then re-invoke this batch file with
\r
11 :: cygwin stripped out of the path.
\r
12 :: Detect cygwin by trying to run bash.
\r
13 bash --version >NUL 2>&1
\r
14 if %ERRORLEVEL% == 0 (
\r
15 bash "%~dp0\scons" %* || exit 1
\r
19 :: Preserve a copy of the PATH (in case we need it later, mainly for cygwin).
\r
20 set PRESCONS_PATH=%PATH%
\r
22 :: Stop incessant CYGWIN complains about "MS-DOS style path"
\r
23 set CYGWIN=nodosfilewarning %CYGWIN%
\r
25 :: Run the included copy of scons.
\r
26 python "%~dp0\scons.py" %*
\r