This patch makes a couple changes to bin/ant that make it possible to run it
under cygwin32 with ANT_HOME and JAVA_HOME set in a way that will also work
with ant.bat in a command window. I.e. you set them Windows-style: c:/ant
and c:/jdk1.3.
I'm hoping someone will commit this for me or point out some better way to
run ant from bash on a windows box. Thanks.
-Peter
Index: src/bin/ant
===================================================================
RCS file: /home/cvspublic/jakarta-ant/src/bin/ant,v
retrieving revision 1.6
diff -u -r1.6 ant
--- src/bin/ant 2000/08/05 15:30:19 1.6
+++ src/bin/ant 2000/12/02 18:01:46
@@ -4,6 +4,12 @@
. $HOME/.antrc
fi
+# Cygwin support.
+if [ "$OSTYPE" == 'cygwin32' ]; then
+ ANT_HOME=`cygpath -u $ANT_HOME`
+ JAVA_HOME=`cygpath -u $JAVA_HOME`
+fi
+
if [ "$ANT_HOME" = "" ] ; then
# try to find ANT
if [ -d /opt/ant ] ; then
@@ -66,6 +72,12 @@
ANT_OPTS=-Djikes.class.path=$JIKESPATH
fi
fi
+
+# More Cygwin support
+if [ "$OSTYPE" == 'cygwin32' ]; then
+ LOCALCLASSPATH=`cygpath -p -w "$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 $@