From b024254e9dfc8f4325dc5e58c67a54a835186a0f Mon Sep 17 00:00:00 2001 From: MrMarble <4268580+MrMarble@users.noreply.github.com> Date: Tue, 30 Jun 2020 10:26:58 +0200 Subject: [PATCH 1/2] WSL path not always starting with /mnt --- util/wsl_install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) mode change 100755 => 100644 util/wsl_install.sh diff --git a/util/wsl_install.sh b/util/wsl_install.sh old mode 100755 new mode 100644 index 8ed177ca3e97..0c0a95e24d04 --- a/util/wsl_install.sh +++ b/util/wsl_install.sh @@ -4,7 +4,10 @@ util_dir=$(dirname "$0") dir=$(cd -P -- "$util_dir" && pwd -P) pushd "$dir"; -if [[ $dir != /mnt/* ]]; +mount_point=$(df ${dir} | tail -1 | cut -d' ' -f 1); +valid_windows_mount="^[A-Z]:\\\\$" + +if [[ ! $mount_point =~ $valid_windows_mount ]]; then echo echo "You need to clone the qmk_firmware repository outside the linux filesystem." @@ -31,7 +34,7 @@ source "$dir/win_shared_install.sh" pip3 install -r ${util_dir}/../requirements.txt -echo +echo echo "Creating a softlink to the utils directory as ~/qmk_utils." echo "This is needed so that the the make system can find all utils it need." read -p "Press enter to continue (ctrl-c to abort)" From 0db14f303cc56ef2d7de104042808fcd6bb66159 Mon Sep 17 00:00:00 2001 From: Alvaro Tinoco Date: Sat, 22 Aug 2020 17:11:44 +0200 Subject: [PATCH 2/2] Update util/wsl_install.sh Co-authored-by: Nick Brassel --- util/wsl_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/wsl_install.sh b/util/wsl_install.sh index 0c0a95e24d04..0bafb154ce9f 100644 --- a/util/wsl_install.sh +++ b/util/wsl_install.sh @@ -4,7 +4,7 @@ util_dir=$(dirname "$0") dir=$(cd -P -- "$util_dir" && pwd -P) pushd "$dir"; -mount_point=$(df ${dir} | tail -1 | cut -d' ' -f 1); +mount_point=$(df "${dir}" | tail -1 | awk '{print $1}') valid_windows_mount="^[A-Z]:\\\\$" if [[ ! $mount_point =~ $valid_windows_mount ]];