Lines 69-88
Link Here
|
69 |
|
69 |
|
70 |
:runAnt |
70 |
:runAnt |
71 |
"%_JAVACMD%" %ANT_OPTS% -classpath "%LOCALCLASSPATH%" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS% |
71 |
"%_JAVACMD%" %ANT_OPTS% -classpath "%LOCALCLASSPATH%" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS% |
|
|
72 |
rem Check the error code of the Ant build |
73 |
if not "%OS%"=="Windows_NT" goto onError |
74 |
set ANT_ERROR=%ERRORLEVEL% |
72 |
goto end |
75 |
goto end |
73 |
|
76 |
|
74 |
:runAntWithJikes |
77 |
:runAntWithJikes |
75 |
"%_JAVACMD%" %ANT_OPTS% -classpath "%LOCALCLASSPATH%" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS% |
78 |
"%_JAVACMD%" %ANT_OPTS% -classpath "%LOCALCLASSPATH%" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS% |
|
|
79 |
rem Check the error code of the Ant build |
80 |
if not "%OS%"=="Windows_NT" goto onError |
81 |
set ANT_ERROR=%ERRORLEVEL% |
76 |
goto end |
82 |
goto end |
77 |
|
83 |
|
|
|
84 |
:onError |
85 |
rem Windows 9x way of checking the error code. It matches via brute force. |
86 |
for %%i in (1 10 100) do set err%%i= |
87 |
for %%i in (0 1 2) do if errorlevel %%i00 set err100=%%i |
88 |
if %err100%==2 goto onError200 |
89 |
if %err100%==0 set err100= |
90 |
for %%i in (0 1 2 3 4 5 6 7 8 9) do if errorlevel %err100%%%i0 set err10=%%i |
91 |
if "%err100%"=="" if %err10%==0 set err10= |
92 |
:onError1 |
93 |
for %%i in (0 1 2 3 4 5 6 7 8 9) do if errorlevel %err100%%err10%%%i set err1=%%i |
94 |
goto onErrorEnd |
95 |
:onError200 |
96 |
for %%i in (0 1 2 3 4 5) do if errorlevel 2%%i0 set err10=%%i |
97 |
if err10==5 for %%i in (0 1 2 3 4 5) do if errorlevel 25%%i set err1=%%i |
98 |
if not err10==5 goto onError1 |
99 |
:onErrorEnd |
100 |
set ANT_ERROR=%err100%%err10%%err1% |
101 |
for %%i in (1 10 100) do set err%%i= |
102 |
|
78 |
:end |
103 |
:end |
79 |
set LOCALCLASSPATH= |
104 |
set LOCALCLASSPATH= |
80 |
set _JAVACMD= |
105 |
set _JAVACMD= |
81 |
set ANT_CMD_LINE_ARGS= |
106 |
set ANT_CMD_LINE_ARGS= |
82 |
|
107 |
|
|
|
108 |
rem Set the return code if we are not in NT. We can only set |
109 |
rem a value of 1, but it's better than nothing. |
110 |
if not "%OS%"=="Windows_NT" if "%ANT_ERROR%"=="" set ANT_ERROR=255 |
111 |
if not "%OS%"=="Windows_NT" if "%ANT_ERROR%"=="0" goto quit |
112 |
if not "%OS%"=="Windows_NT" echo 1 > nul | choice /n /c:1 |
113 |
rem Set the ERRORLEVEL if we are running NT. |
114 |
if "%OS%"=="Windows_NT" if "%ANT_ERROR%"=="" set ANT_ERROR=255 |
115 |
if "%OS%"=="Windows_NT" if not %ANT_ERROR%==0 color 00 |
116 |
goto quit |
117 |
|
118 |
rem If there were no errors, we run the post script. |
83 |
if "%OS%"=="Windows_NT" @endlocal |
119 |
if "%OS%"=="Windows_NT" @endlocal |
84 |
|
120 |
|
85 |
:mainEnd |
121 |
:mainEnd |
86 |
if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat" |
122 |
if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat" |
87 |
|
123 |
|
|
|
124 |
:quit |
88 |
|
125 |
|