Browse Source

ant.bat now looks in %USERPROFILE% and %HOMEDRIVE%%HOMEPATH% in addition to

%HOME% for pre/post batch files. Bugzilla report 39298.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@454805 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 18 years ago
parent
commit
6e51529a56
2 changed files with 18 additions and 4 deletions
  1. +2
    -2
      WHATSNEW
  2. +16
    -2
      src/script/ant.bat

+ 2
- 2
WHATSNEW View File

@@ -51,8 +51,8 @@ Fixed bugs:
* 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:
--------------


+ 16
- 2
src/script/ant.bat View File

@@ -25,9 +25,16 @@ if "%HOME%"=="" goto homeDrivePathPre
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 "%HOME%"=="" goto homeDrivePathPost
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


Loading…
Cancel
Save