diff options
| author | Matthew Jason Benson <mbenson@apache.org> | 2006-10-10 16:13:31 +0000 |
|---|---|---|
| committer | Matthew Jason Benson <mbenson@apache.org> | 2006-10-10 16:13:31 +0000 |
| commit | 6e51529a56452ccc7e0b1afa44b5792fd5dd8bea (patch) | |
| tree | 41c6c59ef0d4a95441d978de06ccedda06813ac6 /src/script | |
| parent | beda79f3193c04008e6d56e08e81413ba4e7ee74 (diff) | |
| download | ant-6e51529a56452ccc7e0b1afa44b5792fd5dd8bea.tar.gz | |
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
Diffstat (limited to 'src/script')
| -rwxr-xr-x | src/script/ant.bat | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/script/ant.bat b/src/script/ant.bat index 0fb851258..6d57c81ea 100755 --- a/src/script/ant.bat +++ b/src/script/ant.bat @@ -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 |
