Stefan Bodewig wrote:
I have tested the script under cygwin.Hi,
I'd like to merge the modifications I made to the Unix wrapper script and the Launcher to the 1.6. branch so that it gets released in 1.6.1. Has anybody found time to try the changed script on Cygwin or even AIX?
I only have one small modification, which is attached and that I reproduce inline below.
The script is working for me with :
$ANT_HOME set to a dir with space
and also
$ANT_HOME set to a dir with space and one lib directory containing an embedded space.
I have also done the test of Matt Benson concerning setting HOME in cygwin to /cygdrive/c.
I have also included a fix for this special case in the patch, and also for 3 other variables possibly ending with a backslash.
Cheers,
Antoine
Index: src/script/ant
===================================================================
RCS file: /home/cvs/ant/src/script/ant,v
retrieving revision 1.44
diff -u -r1.44 ant
--- src/script/ant 9 Feb 2004 21:05:40 -0000 1.44
+++ src/script/ant 10 Feb 2004 22:10:47 -0000
@@ -27,11 +27,11 @@
use_jikes_default=true
elif [ "$arg" = "--execdebug" ] ; then
ant_exec_debug=true
- elif [ "$arg" = "--h" -o "$arg" = "--help" ] ; then
+ elif [ my"$arg" = my"--h" -o my"$arg" = my"--help" ] ; then
show_help=true
ant_exec_args="$ant_exec_args -h"
else
- if [ "$arg" = "-h" -o "$arg" = "-help" ] ; then
+ if [ my"$arg" = my"-h" -o my"$arg" = my"-help" ] ; then
show_help=true
fi
ant_exec_args="$ant_exec_args \"$arg\""
@@ -243,7 +243,29 @@
echo ' launch script'
echo ' '
fi
-
+# add a second backslash to variables terminated by a backslash under cygwin
+if $cygwin; then
+ case "$CYGHOME" in
+ *\\ )
+ CYGHOME="$CYGHOME\\"
+ ;;
+ esac
+ case "$JIKESPATH" in
+ *\\ )
+ JIKESPATH="$JIKESPATH\\"
+ ;;
+ esac
+ case "$LOCALCLASSPATH" in
+ *\\ )
+ LOCALCLASSPATH="LOCALCLASSPATH\\"
+ ;;
+ esac
+ case "$CLASSPATH" in
+ *\\ )
+ CLASSPATH="$CLASSPATH\\"
+ ;;
+ esac
+fi
# Execute ant using eval/exec to preserve spaces in paths,
# java options, and ant args
ant_sys_opts=
Index: src/script/ant =================================================================== RCS file: /home/cvs/ant/src/script/ant,v retrieving revision 1.44 diff -u -r1.44 ant --- src/script/ant 9 Feb 2004 21:05:40 -0000 1.44 +++ src/script/ant 10 Feb 2004 22:10:47 -0000 @@ -27,11 +27,11 @@ use_jikes_default=true elif [ "$arg" = "--execdebug" ] ; then ant_exec_debug=true - elif [ "$arg" = "--h" -o "$arg" = "--help" ] ; then + elif [ my"$arg" = my"--h" -o my"$arg" = my"--help" ] ; then show_help=true ant_exec_args="$ant_exec_args -h" else - if [ "$arg" = "-h" -o "$arg" = "-help" ] ; then + if [ my"$arg" = my"-h" -o my"$arg" = my"-help" ] ; then show_help=true fi ant_exec_args="$ant_exec_args \"$arg\"" @@ -243,7 +243,29 @@ echo ' launch script' echo ' ' fi - +# add a second backslash to variables terminated by a backslash under cygwin +if $cygwin; then + case "$CYGHOME" in + *\\ ) + CYGHOME="$CYGHOME\\" + ;; + esac + case "$JIKESPATH" in + *\\ ) + JIKESPATH="$JIKESPATH\\" + ;; + esac + case "$LOCALCLASSPATH" in + *\\ ) + LOCALCLASSPATH="LOCALCLASSPATH\\" + ;; + esac + case "$CLASSPATH" in + *\\ ) + CLASSPATH="$CLASSPATH\\" + ;; + esac +fi # Execute ant using eval/exec to preserve spaces in paths, # java options, and ant args ant_sys_opts=
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]