OLD | NEW |
1 @echo off | 1 @echo off |
2 | 2 |
3 | 3 |
4 @rem We're in a submodule directory, look relative to the parent. | 4 @rem We're in a submodule directory, look relative to the parent. |
5 call python "%cd%\..\third_party\scons\scons.py" "--site-dir=..\site_scons" %* | 5 call python "%cd%\..\third_party\scons\scons.py" "--site-dir=..\site_scons" %* |
6 goto omega | 6 goto omega |
7 | 7 |
8 :srcdir | 8 :srcdir |
9 call python "%cd%\third_party\scons\scons.py" --site-dir=site_scons %* | 9 call python "%cd%\third_party\scons\scons.py" --site-dir=site_scons %* |
10 goto omega | 10 goto omega |
11 | 11 |
12 @rem Per the following page: | 12 @rem Per the following page: |
13 @rem http://code-bear.com/bearlog/2007/06/01/getting-the-exit-code-from-a-batc
h-file-that-is-run-from-a-python-program/ | 13 @rem http://code-bear.com/bearlog/2007/06/01/getting-the-exit-code-from-a-batc
h-file-that-is-run-from-a-python-program/ |
14 @rem Just calling "exit /b" passes back an exit code, but in a way | 14 @rem Just calling "exit /b" passes back an exit code, but in a way |
15 @rem that does NOT get picked up correctly when executing the .bat | 15 @rem that does NOT get picked up correctly when executing the .bat |
16 @rem file from the Python subprocess module. Using "call" as the | 16 @rem file from the Python subprocess module. Using "call" as the |
17 @rem last command in the .bat file makes it work as expected. | 17 @rem last command in the .bat file makes it work as expected. |
18 | 18 |
19 :returncode | 19 :returncode |
20 exit /b %ERRORLEVEL% | 20 exit /b %ERRORLEVEL% |
21 | 21 |
22 :omega | 22 :omega |
23 call :returncode %ERRORLEVEL% | 23 call :returncode %ERRORLEVEL% |
OLD | NEW |