ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/script ant
Date Thu, 17 Jan 2002 15:49:06 GMT
bodewig     02/01/17 07:49:06

  Modified:    src/script ant
  Log:
  Make automatic detection of ANT_HOME work if ant is a symlink to the
  actual ant script using a relative path as well.
  
  Submitted by:	Leon Breedt <ljb@neverborn.ORG>
  
  Revision  Changes    Path
  1.11      +8 -0      jakarta-ant/src/script/ant
  
  Index: ant
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/script/ant,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ant	10 Jan 2002 14:18:42 -0000	1.10
  +++ ant	17 Jan 2002 15:49:06 -0000	1.11
  @@ -28,6 +28,10 @@
     ## resolve links - $0 may be a link to ant's home
     PRG=$0
     progname=`basename $0`
  +  saveddir=`pwd`
  +
  +  # need this for relative symlinks
  +  cd `dirname $PRG`
     
     while [ -h "$PRG" ] ; do
       ls=`ls -ld "$PRG"`
  @@ -41,6 +45,10 @@
     
     ANT_HOME=`dirname "$PRG"`/..
   
  +  # make it fully qualified
  +  ANT_HOME=`cd "$ANT_HOME" && pwd`
  +
  +  cd $saveddir
   fi
   
   # For Cygwin, ensure paths are in UNIX format before anything is touched
  
  
  

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


Mime
View raw message