ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@locus.apache.org
Subject cvs commit: jakarta-ant/src/bin ant
Date Sat, 30 Dec 2000 03:34:32 GMT
donaldp     00/12/29 19:34:32

  Modified:    src/bin  ant
  Log:
  updated cygwin support
  Submitted By: Bill Burton
  
  Revision  Changes    Path
  1.12      +21 -17    jakarta-ant/src/bin/ant
  
  Index: ant
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/bin/ant,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ant	2000/12/05 07:32:14	1.11
  +++ ant	2000/12/30 03:34:32	1.12
  @@ -4,17 +4,20 @@
     . $HOME/.antrc
   fi
   
  -# Cygwin support.
  -if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ]; then
  -
  -  if [ ! "$ANT_HOME" = "" ]; then
  -    ANT_HOME=`cygpath --path --unix $ANT_HOME`
  -  fi
  -
  -  if [ ! "$JAVA_HOME" = "" ]; then
  -    JAVA_HOME=`cygpath --path --unix $JAVA_HOME`
  -  fi
  -
  +# Cygwin support.  $cygwin _must_ be set to either true or false.
  +case "`uname`" in
  +  CYGWIN*) cygwin=true ;;
  +  *) cygwin=false ;;
  +esac
  +
  +# For Cygwin, ensure paths are in UNIX format before anything is touched
  +if $cygwin; then
  +  [ -n "$ANT_HOME" ] &&
  +    ANT_HOME=`cygpath --unix "$ANT_HOME"`
  +  [ -n "$JAVA_HOME" ] &&
  +    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  +  [ -n "$CLASSPATH" ] &&
  +    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
   fi
   
   if [ "$ANT_HOME" = "" ] ; then
  @@ -76,10 +79,6 @@
   done
   
   if [ "$CLASSPATH" != "" ] ; then
  -  # More Cygwin support
  -  if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
  -    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
  -  fi
     LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
   fi
   
  @@ -107,9 +106,14 @@
     fi
   fi
   
  -# More Cygwin support
  -if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
  +# For Cygwin, switch paths to Windows format before running java
  +if $cygwin; then
  +  ANT_HOME=`cygpath --path --windows "$ANT_HOME"`
  +  JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
     LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"`
   fi
  +
  +$JAVACMD -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS org.apache.tools.ant.Main
$@
  +
   
   $JAVACMD -classpath $LOCALCLASSPATH -Dant.home=${ANT_HOME} $ANT_OPTS org.apache.tools.ant.Main
$@
  
  
  

Mime
View raw message