ant1.7 (1.7.1-7) 01_ant_home_path.patch

Summary

 script/ant |   22 +++-------------------
 1 file changed, 3 insertions(+), 19 deletions(-)

    
download this patch

Patch contents

--- src/script/ant~	2008-06-27 07:05:19.000000000 +0200
+++ src/script/ant	2008-09-30 14:51:50.000000000 +0200
@@ -90,25 +90,9 @@
 esac
 
 if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ] ; then
-  ## resolve links - $0 may be a link to ant's home
-  PRG="$0"
-  progname=`basename "$0"`
-
-  # need this for relative symlinks
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-    else
-    PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-
-  ANT_HOME=`dirname "$PRG"`/..
-
-  # make it fully qualified
-  ANT_HOME=`cd "$ANT_HOME" > /dev/null && pwd`
+  if [ -d /usr/share/ant ] ; then
+     ANT_HOME=/usr/share/ant
+  fi
 fi
 
 # For Cygwin, ensure paths are in UNIX format before anything is touched