diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 913a0a5e9..9471e32ae 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -45,6 +45,7 @@ Christophe Labouisse
Christopher A. Longo
Christopher Charlier
Clemens Hammacher
+Clement OUDOT
Conor MacNeill
Craeg Strong
Craig Cottingham
diff --git a/WHATSNEW b/WHATSNEW
index b280810ad..b68a0359e 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -360,6 +360,9 @@ Fixed bugs:
symbolic links.
Bugzilla Report 46747.
+ * The ant shell script should now support MSYS/MinGW as well.
+ Bugzilla Report 46936.
+
Other changes:
--------------
* A HostInfo task was added performing information on hosts, including info on
diff --git a/contributors.xml b/contributors.xml
index efa9113ec..71228e495 100644
--- a/contributors.xml
+++ b/contributors.xml
@@ -202,6 +202,10 @@
Clemens
Hammacher
+
+ Clement
+ OUDOT
+
Conor
MacNeill
diff --git a/src/script/ant b/src/script/ant
index 0dc22fe0b..0dc84e045 100644
--- a/src/script/ant
+++ b/src/script/ant
@@ -80,6 +80,7 @@ fi
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
+mingw=false;
case "`uname`" in
CYGWIN*) cygwin=true ;;
Darwin*) darwin=true
@@ -87,6 +88,7 @@ case "`uname`" in
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
fi
;;
+ MINGW*) mingw=true ;;
esac
if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ] ; then
@@ -111,13 +113,20 @@ if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ] ; then
ANT_HOME=`cd "$ANT_HOME" > /dev/null && pwd`
fi
-# For Cygwin, ensure paths are in UNIX format before anything is touched
+# For Cygwin and Mingw, ensure paths are in UNIX format before
+# anything is touched
if $cygwin ; then
[ -n "$ANT_HOME" ] &&
ANT_HOME=`cygpath --unix "$ANT_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
+if $mingw ; then
+ [ -n "$ANT_HOME" ] &&
+ ANT_HOME="`(cd "$ANT_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
# set ANT_LIB location
ANT_LIB="${ANT_HOME}/lib"