conor 01/07/12 05:12:58
Modified: . bootstrap.bat
src/script ant.bat
Log:
Use /nul when checkign for the existence of directories on Windows
(Although it doesn't work if the directory name is quoted - woohoo)
Check for Ant in C:\Ant for Windows 9X users
PR: 2101
Based on suggestion by [EMAIL PROTECTED] (Ed Swierk)
Revision Changes Path
1.37 +7 -7 jakarta-ant/bootstrap.bat
Index: bootstrap.bat
===================================================================
RCS file: /home/cvs/jakarta-ant/bootstrap.bat,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- bootstrap.bat 2001/07/07 12:37:59 1.36
+++ bootstrap.bat 2001/07/12 12:12:42 1.37
@@ -18,10 +18,10 @@
echo.
echo ... Bootstrapping Ant Distribution
-if "%OS%" == "Windows_NT" if exist bootstrap rmdir/s/q bootstrap
-if not "%OS%" == "Windows_NT" if exist bootstrap deltree/y bootstrap
-if "%OS%" == "Windows_NT" if exist build\classes rmdir/s/q build\classes
-if not "%OS%" == "Windows_NT" if exist build\classes deltree/y build\classes
+if "%OS%" == "Windows_NT" if exist bootstrap\nul rmdir/s/q bootstrap
+if not "%OS%" == "Windows_NT" if exist bootstrap\nul deltree/y bootstrap
+if "%OS%" == "Windows_NT" if exist build\classes\nul rmdir/s/q
build\classes
+if not "%OS%" == "Windows_NT" if exist build\classes\nul deltree/y
build\classes
SET LOCALCLASSPATH=lib\crimson.jar;lib\jaxp.jar;lib\optional\junit.jar
@@ -41,9 +41,9 @@
if "%OS%" == "Windows_NT" if exist %CLASSDIR%\nul rmdir/s/q %CLASSDIR%
if not "%OS%" == "Windows_NT" if exist %CLASSDIR%\nul deltree/y %CLASSDIR%
-if not exist %CLASSDIR% mkdir %CLASSDIR%
-if not exist build mkdir build
-if not exist build\classes mkdir build\classes
+if not exist %CLASSDIR%\nul mkdir %CLASSDIR%
+if not exist build\nul mkdir build
+if not exist build\classes\nul mkdir build\classes
echo.
echo ... Compiling Ant Classes
1.11 +7 -1 jakarta-ant/src/script/ant.bat
Index: ant.bat
===================================================================
RCS file: /home/cvs/jakarta-ant/src/script/ant.bat,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ant.bat 2001/07/12 10:30:28 1.10
+++ ant.bat 2001/07/12 12:12:51 1.11
@@ -52,8 +52,14 @@
:checkSystemDrive
rem check for ant in root directory of system drive
-if not exist "%SystemDrive%\ant" goto noAntHome
+if not exist %SystemDrive%\ant\nul goto checkCDrive
set ANT_HOME=%SystemDrive%\ant
+goto checkJava
+
+:checkCDrive
+rem check for ant in C:\ant for Win9X users
+if not exist C:\ant\nul goto noAntHome
+set ANT_HOME=C:\ant
goto checkJava
:noAntHome