hammer.bat 745 B

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