View | Details | Raw Unified | Return to bug 13655
Collapse All | Expand All

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

Return to bug 13655