mbenson 2004/05/06 09:42:18 Modified: src/script ant Log: Cygwin/UNC ANT_HOME compatibility using mixed paths on NT-family systems. Revision Changes Path 1.48 +17 -6 ant/src/script/ant Index: ant =================================================================== RCS file: /home/cvs/ant/src/script/ant,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- ant 2 Mar 2004 21:57:42 -0000 1.47 +++ ant 6 May 2004 16:42:18 -0000 1.48 @@ -222,13 +222,19 @@ ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes" fi -# For Cygwin, switch paths to Windows format before running java +# For Cygwin, switch paths to appropriate format before running java if $cygwin; then - ANT_HOME=`cygpath --windows "$ANT_HOME"` - ANT_LIB=`cygpath --windows "$ANT_LIB"` - JAVA_HOME=`cygpath --windows "$JAVA_HOME"` - LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"` - CYGHOME=`cygpath --windows "$HOME"` + if [ "$OS" = "Windows_NT" ] ; then + format=mixed + else + format=windows + fi + ANT_HOME=`cygpath --$format "$ANT_HOME"` + ANT_LIB=`cygpath --$format "$ANT_LIB"` + JAVA_HOME=`cygpath --$format "$JAVA_HOME"` + LOCALCLASSPATH=`cygpath --path --$format "$LOCALCLASSPATH"` + CLASSPATH=`cygpath --path --$format "$OCALCLASSPATH"` + CYGHOME=`cygpath --$format "$HOME"` fi # Show script help if requested @@ -247,6 +253,11 @@ fi # add a second backslash to variables terminated by a backslash under cygwin if $cygwin; then + case "$ANT_HOME" in + *\\ ) + ANT_HOME="$ANT_HOME\\" + ;; + esac case "$CYGHOME" in *\\ ) CYGHOME="$CYGHOME\\"
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]