summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorMatthew Jason Benson <mbenson@apache.org>2004-05-06 16:42:18 +0000
committerMatthew Jason Benson <mbenson@apache.org>2004-05-06 16:42:18 +0000
commitb706854c2172afdbf6d99fa3b790ecaaa7369640 (patch)
tree3101302bbb8c233733db2eadd8832f025fae0427 /src/script
parentfd7bc94892d3eea660fe7e9ce313144557f39216 (diff)
downloadant-b706854c2172afdbf6d99fa3b790ecaaa7369640.tar.gz
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
Diffstat (limited to 'src/script')
-rw-r--r--src/script/ant23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/script/ant b/src/script/ant
index 4f28a909b..ed25ebd1d 100644
--- a/src/script/ant
+++ b/src/script/ant
@@ -222,13 +222,19 @@ if $usejikes; then
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 @@ if $show_help ; then
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\\"