From e49a5fb5644508cc28576955cebb347071848b94 Mon Sep 17 00:00:00 2001 From: Conor MacNeill Date: Thu, 12 Jul 2001 12:12:51 +0000 Subject: [PATCH] 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 eswierk@cs.stanford.edu (Ed Swierk) git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269331 13f79535-47bb-0310-9956-ffa450edef68 --- bootstrap.bat | 14 +++++++------- src/script/ant.bat | 8 +++++++- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/bootstrap.bat b/bootstrap.bat index 4c804c7d3..5662896de 100755 --- a/bootstrap.bat +++ b/bootstrap.bat @@ -18,10 +18,10 @@ if "" == "%JAVAC%" set JAVAC=%JAVA_HOME%\bin\javac 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 @@ echo CLASSPATH=%CLASSPATH% 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 diff --git a/src/script/ant.bat b/src/script/ant.bat index 0ca93324d..81a2835be 100755 --- a/src/script/ant.bat +++ b/src/script/ant.bat @@ -52,10 +52,16 @@ goto checkJava :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 echo ANT_HOME is not set and ant could not be located. Please set ANT_HOME. goto end