From c2096bb5159f3b0d188653cf17cd771725ae7e1a Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 28 May 2017 14:42:02 +0300 Subject: Add driver installation --- util/wsl_install.sh | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'util/wsl_install.sh') diff --git a/util/wsl_install.sh b/util/wsl_install.sh index c3aeba6d6..9df715b81 100644 --- a/util/wsl_install.sh +++ b/util/wsl_install.sh @@ -1,6 +1,6 @@ #!/bin/bash -download_dir = wsl_downloaded +download_dir=wsl_downloaded function install_utils { rm -f -r $download_dir @@ -33,7 +33,11 @@ function install_utils { popd > /dev/null } -function make_environment { +function install_drivers { + pushd $download_dir + cp ../drivers.txt . + cmd.exe /C qmk_driver_installer.exe $1 $2 ../drivers.txt + popd > /dev/null } echo "Installing dependencies (p7zip-full, wget)" @@ -54,5 +58,22 @@ pushd "$dir" #install_utils +while true; do + echo + echo "Which USB drivers do you want to install?" + echo "(A)all - All supported drivers will be installed" + echo "(C)onnected - Only drivers for connected keyboards (in bootloader/flashing mode) will be installed" + echo "(F)force - Like all, but will also override existing drivers for connected keyboards" + echo "(N)one - No drivers will be installed, flashing your keyboard will most likely not work" + read -p "(A/C/F/N)? " res + case $res in + [Aa]* ) install_drivers --all; break;; + [Cc]* ) install_drivers; break;; + [Ff]* ) install_drivers --all --force; break;; + [Nn]* ) break;; + * ) echo "Invalid answer";; + esac +done + popd > /dev/null -- cgit v1.2.3-24-g4f1b