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