antRun.bat 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. @echo off
  2. REM Licensed to the Apache Software Foundation (ASF) under one or more
  3. REM contributor license agreements. See the NOTICE file distributed with
  4. REM this work for additional information regarding copyright ownership.
  5. REM The ASF licenses this file to You under the Apache License, Version 2.0
  6. REM (the "License"); you may not use this file except in compliance with
  7. REM the License. You may obtain a copy of the License at
  8. REM
  9. REM http://www.apache.org/licenses/LICENSE-2.0
  10. REM
  11. REM Unless required by applicable law or agreed to in writing, software
  12. REM distributed under the License is distributed on an "AS IS" BASIS,
  13. REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. REM See the License for the specific language governing permissions and
  15. REM limitations under the License.
  16. if "%OS%"=="Windows_NT" @setlocal
  17. if "%OS%"=="WINNT" @setlocal
  18. if ""%1""=="""" goto runCommand
  19. rem Change drive and directory to %1
  20. if "%OS%"=="Windows_NT" goto nt_cd
  21. if "%OS%"=="WINNT" goto nt_cd
  22. cd ""%1""
  23. goto end_cd
  24. :nt_cd
  25. cd /d ""%1""
  26. :end_cd
  27. shift
  28. rem Slurp the command line arguments. This loop allows for an unlimited number
  29. rem of arguments (up to the command line limit, anyway).
  30. set ANT_RUN_CMD=%1
  31. if ""%1""=="""" goto runCommand
  32. shift
  33. :loop
  34. if ""%1""=="""" goto runCommand
  35. set ANT_RUN_CMD=%ANT_RUN_CMD% %1
  36. shift
  37. goto loop
  38. :runCommand
  39. rem echo %ANT_RUN_CMD%
  40. %ANT_RUN_CMD%
  41. if "%OS%"=="Windows_NT" @endlocal
  42. if "%OS%"=="WINNT" @endlocal