diff options
Diffstat (limited to 'util/win_shared_install.sh')
| -rwxr-xr-x | util/win_shared_install.sh | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/util/win_shared_install.sh b/util/win_shared_install.sh deleted file mode 100755 index f45ca3517..000000000 --- a/util/win_shared_install.sh +++ /dev/null | |||
| @@ -1,63 +0,0 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | function install_utils { | ||
| 4 | rm -f -r "$download_dir" | ||
| 5 | mkdir "$download_dir" | ||
| 6 | |||
| 7 | pushd "$download_dir" | ||
| 8 | |||
| 9 | echo "Downloading the QMK driver installer" | ||
| 10 | wget -qO- https://api.github.com/repos/qmk/qmk_driver_installer/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4 | wget -i - | ||
| 11 | |||
| 12 | rm -f *.zip | ||
| 13 | |||
| 14 | popd > /dev/null | ||
| 15 | } | ||
| 16 | |||
| 17 | function install_drivers { | ||
| 18 | pushd "$download_dir" | ||
| 19 | cp -f "$dir/drivers.txt" . | ||
| 20 | echo | ||
| 21 | cmd.exe //c "qmk_driver_installer.exe $1 $2 drivers.txt" | ||
| 22 | popd > /dev/null | ||
| 23 | } | ||
| 24 | |||
| 25 | pushd "$dir" | ||
| 26 | |||
| 27 | if [ ! -d "$download_dir" ]; then | ||
| 28 | install_utils | ||
| 29 | else | ||
| 30 | while true; do | ||
| 31 | echo | ||
| 32 | echo "The utils seem to already be downloaded." | ||
| 33 | read -p "Do you want to re-download them and update to the newest version (Y/N) " res | ||
| 34 | case $res in | ||
| 35 | [Yy]* ) install_utils; break;; | ||
| 36 | [Nn]* ) break;; | ||
| 37 | * ) echo "Invalid answer";; | ||
| 38 | esac | ||
| 39 | done | ||
| 40 | fi | ||
| 41 | |||
| 42 | while true; do | ||
| 43 | echo | ||
| 44 | echo "Which USB drivers do you want to install?" | ||
| 45 | echo "(A)ll - All supported drivers will be installed" | ||
| 46 | echo "(C)onnected - Only drivers for connected keyboards (in bootloader/flashing mode)" | ||
| 47 | echo " will be installed" | ||
| 48 | echo "(F)orce - Like all, but will also override existing drivers for connected" | ||
| 49 | echo " keyboards" | ||
| 50 | echo "(N)one - No drivers will be installed," | ||
| 51 | echo " flashing your keyboard will most likely not work" | ||
| 52 | read -p "(a/c/f/N)? " res | ||
| 53 | case $res in | ||
| 54 | [AaYy]* ) install_drivers --all; break;; | ||
| 55 | [Cc]* ) install_drivers; break;; | ||
| 56 | [Ff]* ) install_drivers --all --force; break;; | ||
| 57 | [Nn]* | "" ) break;; | ||
| 58 | * ) echo "Invalid answer";; | ||
| 59 | esac | ||
| 60 | done | ||
| 61 | |||
| 62 | |||
| 63 | popd > /dev/null | ||
