From 69cedf07329df8eb38717f26643e33b2259723b8 Mon Sep 17 00:00:00 2001 From: baldurk Date: Sat, 18 Aug 2018 16:42:54 +0100 Subject: [PATCH] Locate windows root as it is /mnt/c by default on Windows 10 WSL --- util/buildscripts/build.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/util/buildscripts/build.sh b/util/buildscripts/build.sh index 1277f5e22..67b96c60c 100755 --- a/util/buildscripts/build.sh +++ b/util/buildscripts/build.sh @@ -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";