mingw: Use windows path style when building with MinGW

When building with MinGW the base path has to be with the windows style
format path.

Change-Id: I67c116c424e6ad70cc0e1a4fc1620361eaabbb82
Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
diff --git a/zephyr-env.sh b/zephyr-env.sh
index 0069466..ec24450 100644
--- a/zephyr-env.sh
+++ b/zephyr-env.sh
@@ -8,8 +8,10 @@
 # zephyr-env_install.bash in your home directory. It will be automatically
 # run (if it exists) by this script.
 
+uname | grep -q MINGW && MINGW_OPT="-W"
+
 # identify OS source tree root directory
-export ZEPHYR_BASE=$( builtin cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+export ZEPHYR_BASE=$( builtin cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ${MINGW_OPT})
 
 scripts_path=${ZEPHYR_BASE}/scripts
 echo "${PATH}" | grep -q "${scripts_path}"