diff options
| author | Fred Sundvik <fsundvik@gmail.com> | 2017-05-28 14:42:02 +0300 |
|---|---|---|
| committer | Fred Sundvik <fsundvik@gmail.com> | 2017-05-28 21:30:55 +0300 |
| commit | c2096bb5159f3b0d188653cf17cd771725ae7e1a (patch) | |
| tree | 4f0f76e01f07711a2d1312baf84341973d6d03cf /util/wsl_install.sh | |
| parent | aa26464480c3080ed935d49cce3f4b9b33c9c05f (diff) | |
| download | qmk_firmware-c2096bb5159f3b0d188653cf17cd771725ae7e1a.tar.gz qmk_firmware-c2096bb5159f3b0d188653cf17cd771725ae7e1a.zip | |
Add driver installation
Diffstat (limited to 'util/wsl_install.sh')
| -rw-r--r-- | util/wsl_install.sh | 25 |
1 files changed, 23 insertions, 2 deletions
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 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | 2 | ||
| 3 | download_dir = wsl_downloaded | 3 | download_dir=wsl_downloaded |
| 4 | 4 | ||
| 5 | function install_utils { | 5 | function install_utils { |
| 6 | rm -f -r $download_dir | 6 | rm -f -r $download_dir |
| @@ -33,7 +33,11 @@ function install_utils { | |||
| 33 | popd > /dev/null | 33 | popd > /dev/null |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | function make_environment { | 36 | function install_drivers { |
| 37 | pushd $download_dir | ||
| 38 | cp ../drivers.txt . | ||
| 39 | cmd.exe /C qmk_driver_installer.exe $1 $2 ../drivers.txt | ||
| 40 | popd > /dev/null | ||
| 37 | } | 41 | } |
| 38 | 42 | ||
| 39 | echo "Installing dependencies (p7zip-full, wget)" | 43 | echo "Installing dependencies (p7zip-full, wget)" |
| @@ -54,5 +58,22 @@ pushd "$dir" | |||
| 54 | 58 | ||
| 55 | #install_utils | 59 | #install_utils |
| 56 | 60 | ||
| 61 | while true; do | ||
| 62 | echo | ||
| 63 | echo "Which USB drivers do you want to install?" | ||
| 64 | echo "(A)all - All supported drivers will be installed" | ||
| 65 | echo "(C)onnected - Only drivers for connected keyboards (in bootloader/flashing mode) will be installed" | ||
| 66 | echo "(F)force - Like all, but will also override existing drivers for connected keyboards" | ||
| 67 | echo "(N)one - No drivers will be installed, flashing your keyboard will most likely not work" | ||
| 68 | read -p "(A/C/F/N)? " res | ||
| 69 | case $res in | ||
| 70 | [Aa]* ) install_drivers --all; break;; | ||
| 71 | [Cc]* ) install_drivers; break;; | ||
| 72 | [Ff]* ) install_drivers --all --force; break;; | ||
| 73 | [Nn]* ) break;; | ||
| 74 | * ) echo "Invalid answer";; | ||
| 75 | esac | ||
| 76 | done | ||
| 77 | |||
| 57 | popd > /dev/null | 78 | popd > /dev/null |
| 58 | 79 | ||
