aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/win32/msys_tools/msys2win_path.sh
diff options
context:
space:
mode:
authorunknown <[email protected]>2011-02-22 17:29:46 +0100
committerPatrik Nyblom <[email protected]>2011-12-02 15:21:10 +0100
commit7b3596ba1521f201c9416fc7a0385cb7e6c6f495 (patch)
treed3c0f1152ec3ee094e3fb142c091d89786b5ac46 /erts/etc/win32/msys_tools/msys2win_path.sh
parentdef5331a201ab811150599b969abf751a4954ceb (diff)
downloadotp-7b3596ba1521f201c9416fc7a0385cb7e6c6f495.tar.gz
otp-7b3596ba1521f201c9416fc7a0385cb7e6c6f495.tar.bz2
otp-7b3596ba1521f201c9416fc7a0385cb7e6c6f495.zip
Build Win64 Erlang emulator using MSYS
Still does not run, just compiles.
Diffstat (limited to 'erts/etc/win32/msys_tools/msys2win_path.sh')
-rw-r--r--erts/etc/win32/msys_tools/msys2win_path.sh44
1 files changed, 44 insertions, 0 deletions
diff --git a/erts/etc/win32/msys_tools/msys2win_path.sh b/erts/etc/win32/msys_tools/msys2win_path.sh
new file mode 100644
index 0000000000..679a9d6a8f
--- /dev/null
+++ b/erts/etc/win32/msys_tools/msys2win_path.sh
@@ -0,0 +1,44 @@
+#! /bin/bash
+MIXED=false
+ABSOLUTE=false
+done=false
+while [ $done = false ]; do
+ case "$1" in
+ -m)
+ MIXED=true;
+ shift;;
+ -a)
+ ABSOLUTE=true;
+ shift;;
+ *)
+ done=true;;
+ esac
+done
+if [ -z "$1" ]; then
+ echo "Usage: $0 <path>" >&2
+ exit 1;
+fi
+MSYS_PATH=`win2msys_path.sh "$1"` # Clean up spaces
+if [ $ABSOLUTE = true ]; then
+ MSYS_DIR=`dirname "$MSYS_PATH"`
+ MSYS_FILE=`basename "$MSYS_PATH"`
+ if [ X"$MSYS_FILE" = X".." ]; then
+ MSYS_DIR="$MSYS_DIR/$MSYS_FILE"
+ WIN_ADD=""
+ else
+ WIN_ADD="/$MSYS_FILE"
+ fi
+ SAVEDIR=`pwd`
+ cd $MSYS_DIR
+ CURRENT=`pwd`
+ cd $SAVEDIR
+ WINPATH=`cmd //C echo $CURRENT`
+ WINPATH="$WINPATH$WIN_ADD"
+else
+ WINPATH=`cmd //c echo $MSYS_PATH`
+fi
+if [ $MIXED = true ]; then
+ echo $WINPATH
+else
+ echo $WINPATH | sed 's,/,\\,g'
+fi \ No newline at end of file