Locate windows root as it is /mnt/c by default on Windows 10 WSL

This commit is contained in:
baldurk
2018-08-18 16:42:54 +01:00
parent 35d23582c1
commit 69cedf0732
+12
View File
@@ -119,9 +119,21 @@ PLATFORM=$(uname)
if uname -a | grep -qiE 'msys|cygwin|microsoft'; then
PLATFORM=Windows
if [ -d /c/Windows ]; then
WIN_ROOT=/
elif [ -d /mnt/c/Windows ]; then
WIN_ROOT=/mnt/
elif [ -d /cygdrive/c/Windows ]; then
WIN_ROOT=/cygdrive/
else
echo "Can't locate Windows root";
exit 1;
fi
fi
export PLATFORM;
export WIN_ROOT;
echo "Platform: $PLATFORM";
echo "Build root: $BUILD_ROOT";