Show
Ignore:
Timestamp:
05/21/08 14:14:00 (18 months ago)
Author:
dr2chase
Message:

This time for sure, make ./ant work if it guesses ANT_HOME, even if DOT is on the PATH

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ProjectFortress/ant

    r1675 r1698  
    4242  fi 
    4343 
    44   # Otherwise use whatever is in $PATH 
    45   result="`which ant 2>/dev/null`" 
     44  # Otherwise use whatever is in $PATH, minus any dots 
     45  export NODOTPATH="`echo "$PATH" | sed -e '1,$s/^[.]://g'`" 
     46  NODOTPATH="`echo "$NODOTPATH" | sed -e '1,$s/:[.]:/:/g'`" 
     47  NODOTPATH="`echo "$NODOTPATH" | sed -e '1,$s/:[.]$//g'`" 
     48  result="`(PATH="$NODOTPATH" which ant 2>/dev/null)`" 
    4649  if [ -z "$result" ]; then 
    4750    echo "Could not find ant. You need to install it. See http://ant.apache.org/ for details." >&2