Browse Source

changes following tests under cygwin

adding a second backslash to variables terminated with a backslash to ensure
also prevent problem with evaluation of test expressions where -f is compared to something else
this error message was happening
+ [ -f = --h -o -f = --help ]
[: --h: unknown operand
+ [ -f = -h -o -f = -help ]
[: -h: unknown operand


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276072 13f79535-47bb-0310-9956-ffa450edef68
master
Antoine Levy-Lambert 21 years ago
parent
commit
9a63708727
1 changed files with 25 additions and 3 deletions
  1. +25
    -3
      src/script/ant

+ 25
- 3
src/script/ant View File

@@ -27,11 +27,11 @@ for arg in "$@" ; do
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 @@ if $show_help ; then
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=


Loading…
Cancel
Save