You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by mb...@apache.org on 2006/10/10 18:13:32 UTC

svn commit: r454805 - in /ant/core/trunk: WHATSNEW src/script/ant.bat

Author: mbenson
Date: Tue Oct 10 09:13:31 2006
New Revision: 454805

URL: http://svn.apache.org/viewvc?view=rev&rev=454805
Log:
ant.bat now looks in %USERPROFILE% and %HOMEDRIVE%%HOMEPATH% in addition to
%HOME% for pre/post batch files. Bugzilla report 39298.

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/script/ant.bat

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=454805&r1=454804&r2=454805
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Tue Oct 10 09:13:31 2006
@@ -51,8 +51,8 @@
 * PathConvert on Windows should process forward and back slashes equivalently.
   Bugzilla report 32884.
 
-* ant.bat did not look in %HOMEDRIVE%%HOMEPATH% for pre/post batch files on
-  WinXP. Bugzilla report 39298.
+* ant.bat now looks in %USERPROFILE% and %HOMEDRIVE%%HOMEPATH% in addition to
+  %HOME% for pre/post batch files. Bugzilla report 39298.
 
 Other changes:
 --------------

Modified: ant/core/trunk/src/script/ant.bat
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/script/ant.bat?view=diff&rev=454805&r1=454804&r2=454805
==============================================================================
--- ant/core/trunk/src/script/ant.bat (original)
+++ ant/core/trunk/src/script/ant.bat Tue Oct 10 09:13:31 2006
@@ -25,9 +25,16 @@
 if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
 
 :homeDrivePathPre
-if "%HOMEDRIVE%%HOMEPATH%%"=="" goto alpha
+if "%HOMEDRIVE%%HOMEPATH%"=="" goto userProfilePre
+if "%HOMEDRIVE%%HOMEPATH%"=="%HOME%" goto userProfilePre
 if exist "%HOMEDRIVE%%HOMEPATH%\antrc_pre.bat" call "%HOMEDRIVE%%HOMEPATH%\antrc_pre.bat"
 
+:userProfilePre
+if "%USERPROFILE%"=="" goto alpha
+if "%USERPROFILE%"=="%HOME%" goto alpha
+if "%USERPROFILE%"=="%HOMEDRIVE%%HOMEPATH%" goto alpha
+if exist "%USERPROFILE%\antrc_pre.bat" call "%USERPROFILE%\antrc_pre.bat"
+
 :alpha
 
 if "%OS%"=="Windows_NT" @setlocal
@@ -205,8 +212,15 @@
 if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
 
 :homeDrivePathPost
-if "%HOMEDRIVE%%HOMEPATH%"=="" goto omega
+if "%HOMEDRIVE%%HOMEPATH%"=="" goto userProfilePost
+if "%HOMEDRIVE%%HOMEPATH%"=="%HOME%" goto userProfilePost
 if exist "%HOMEDRIVE%%HOMEPATH%\antrc_post.bat" call "%HOMEDRIVE%%HOMEPATH%\antrc_post.bat"
+
+:userProfilePost
+if "%USERPROFILE%"=="" goto omega
+if "%USERPROFILE%"=="%HOME%" goto omega
+if "%USERPROFILE%"=="%HOMEDRIVE%%HOMEPATH%" goto omega
+if exist "%USERPROFILE%\antrc_post.bat" call "%USERPROFILE%\antrc_post.bat"
 
 :omega
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org