You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jv...@apache.org on 2006/09/28 07:37:09 UTC

svn commit: r450702 - /maven/components/trunk/maven-cli/src/bin/mvn

Author: jvanzyl
Date: Wed Sep 27 22:37:08 2006
New Revision: 450702

URL: http://svn.apache.org/viewvc?view=rev&rev=450702
Log:
MNG-1827 making bash script work on mingw

Modified:
    maven/components/trunk/maven-cli/src/bin/mvn

Modified: maven/components/trunk/maven-cli/src/bin/mvn
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-cli/src/bin/mvn?view=diff&rev=450702&r1=450701&r2=450702
==============================================================================
--- maven/components/trunk/maven-cli/src/bin/mvn (original)
+++ maven/components/trunk/maven-cli/src/bin/mvn Wed Sep 27 22:37:08 2006
@@ -37,8 +37,10 @@
 # OS specific support.  $var _must_ be set to either true or false.
 cygwin=false;
 darwin=false;
+mingw=false
 case "`uname`" in
   CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
   Darwin*) darwin=true 
            if [ -z "$JAVA_VERSION" ] ; then
              JAVA_VERSION="CurrentJDK"
@@ -100,6 +102,15 @@
     JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
   [ -n "$CLASSPATH" ] &&
     CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Migwn, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+  # TODO classpath?
 fi
 
 if [ -z "$JAVACMD" ] ; then