Browse Source

Cygwin/UNC ANT_HOME compatibility using mixed paths on NT-family systems.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276434 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 21 years ago
parent
commit
b706854c21
1 changed files with 17 additions and 6 deletions
  1. +17
    -6
      src/script/ant

+ 17
- 6
src/script/ant View File

@@ -222,13 +222,19 @@ if $usejikes; then
ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes" ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes"
fi fi


# For Cygwin, switch paths to Windows format before running java
# For Cygwin, switch paths to appropriate format before running java
if $cygwin; then 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 fi


# Show script help if requested # Show script help if requested
@@ -247,6 +253,11 @@ if $show_help ; then
fi fi
# add a second backslash to variables terminated by a backslash under cygwin # add a second backslash to variables terminated by a backslash under cygwin
if $cygwin; then if $cygwin; then
case "$ANT_HOME" in
*\\ )
ANT_HOME="$ANT_HOME\\"
;;
esac
case "$CYGHOME" in case "$CYGHOME" in
*\\ ) *\\ )
CYGHOME="$CYGHOME\\" CYGHOME="$CYGHOME\\"


Loading…
Cancel
Save