Browse Source

PR: 31245

cygwin part to handle both unix and windows style paths correctly


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277990 13f79535-47bb-0310-9956-ffa450edef68
master
Jacobus Martinus Kruithof 20 years ago
parent
commit
22393835bf
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      src/script/ant

+ 8
- 2
src/script/ant View File

@@ -214,6 +214,10 @@ if $usejikes; then
fi

# For Cygwin, switch paths to appropriate format before running java
# For PATHs convert to unix format first, then to windows format to ensure
# both formats are supported. Probably this will fail on directories with ;
# in the name in the path. Let's assume that paths containing ; are more
# rare than windows style paths on cygwin.
if $cygwin; then
if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
format=mixed
@@ -223,9 +227,11 @@ if $cygwin; then
ANT_HOME=`cygpath --$format "$ANT_HOME"`
ANT_LIB=`cygpath --$format "$ANT_LIB"`
JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
LOCALCLASSPATH=`cygpath --path --$format "$LOCALCLASSPATH"`
LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
if [ -n "$CLASSPATH" ] ; then
CLASSPATH=`cygpath --path --$format "$CLASSPATH"`
CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
fi
CYGHOME=`cygpath --$format "$HOME"`
fi


Loading…
Cancel
Save