3 function install_utils {
4 rm -f -r "$download_dir"
9 echo "Installing dfu-programmer"
10 wget 'http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip'
11 unzip -d dfu-programmer dfu-programmer-win-0.7.2.zip
13 echo "Installing dfu-util"
14 wget 'http://dfu-util.sourceforge.net/releases/dfu-util-0.9-win64.zip'
15 unzip dfu-util-0.9-win64.zip
17 echo "Installing teensy_loader_cli"
18 wget 'https://www.pjrc.com/teensy/teensy_loader_cli_windows.zip'
19 unzip teensy_loader_cli_windows.zip
21 echo "Installing Atmel Flip"
22 wget 'http://ww1.microchip.com/downloads/en/DeviceDoc/Flip%20Installer%20-%203.4.7.112.exe'
23 mv Flip\ Installer\ \-\ 3.4.7.112.exe FlipInstaller.exe
25 echo "Downloading the QMK driver installer"
26 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 -
33 function install_drivers {
35 cp -f "$dir/drivers.txt" .
37 cmd.exe //c "qmk_driver_installer.exe $1 $2 drivers.txt"
43 if [ ! -d "$download_dir" ]; then
48 echo "The utils seem to already be downloaded."
49 read -p "Do you want to re-download them and update to the newest version (Y/N) " res
51 [Yy]* ) install_utils; break;;
53 * ) echo "Invalid answer";;
60 echo "Which USB drivers do you want to install?"
61 echo "(A)all - All supported drivers will be installed"
62 echo "(C)onnected - Only drivers for connected keyboards (in bootloader/flashing mode)"
63 echo " will be installed"
64 echo "(F)force - Like all, but will also override existing drivers for connected"
66 echo "(N)one - No drivers will be installed,"
67 echo " flashing your keyboard will most likely not work"
68 read -p "(A/C/F/N)? " res
70 [Aa]* ) install_drivers --all; break;;
71 [Cc]* ) install_drivers; break;;
72 [Ff]* ) install_drivers --all --force; break;;
74 * ) echo "Invalid answer";;