Browse Source

Automagic detection of ANT_HOME for windows NT/2000

Submitted by: "Vincent Bergbauer" <vincent_bergbauer@yahoo.com> via Louis Tribble <louis.tribble@metamata.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268357 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
411d9ef9b9
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      src/bin/ant.bat

+ 13
- 0
src/bin/ant.bat View File

@@ -2,6 +2,19 @@


if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat" if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"


if not "%OS%"=="Windows_NT" goto start

rem %~dp0 is name of current script under NT
set DEFAULT_ANT_HOME=%~dp0

rem : operator works similar to make : operator
set DEFAULT_ANT_HOME=%DEFAULT_ANT_HOME:\bin\=%

if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
set DEFAULT_ANT_HOME=

:start

rem Slurp the command line arguments. This loop allows for an unlimited number of rem Slurp the command line arguments. This loop allows for an unlimited number of
rem agruments (up to the command line limit, anyway). rem agruments (up to the command line limit, anyway).




Loading…
Cancel
Save