3 download_dir=win_downloaded
4 wsl_download_dir=wsl_downloaded
6 function install_utils {
12 echo "Installing dfu-programmer"
13 wget 'http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip'
14 unzip -d dfu-programmer dfu-programmer-win-0.7.2.zip
16 echo "Installing dfu-util"
17 wget 'http://dfu-util.sourceforge.net/releases/dfu-util-0.9-win64.zip'
18 unzip dfu-util-0.9-win64.zip
20 echo "Installing teensy_loader_cli"
21 wget 'https://www.pjrc.com/teensy/teensy_loader_cli_windows.zip'
22 unzip teensy_loader_cli_windows.zip
24 echo "Installing Atmel Flip"
25 wget 'http://www.atmel.com/images/Flip%20Installer%20-%203.4.7.112.exe'
26 mv Flip\ Installer\ \-\ 3.4.7.112.exe FlipInstaller.exe
28 echo "Downloading the QMK driver installer"
29 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 -
36 function install_drivers {
39 cmd.exe /c "qmk_driver_installer.exe $1 $2 ..\\drivers.txt"
45 if [ -d "$wsl_download_dir" ]; then
46 echo "Renaming existing wsl_download_dir to win_download"
47 mv -f "$wsl_download_dir" "$download_dir"
50 if [ ! -d "$download_dir" ]; then
55 read -p "The utils seem to already be downloaded, do you want to re-download them and update to the newest version (Y/N) " res
57 [Yy]* ) install_utils; break;;
59 * ) echo "Invalid answer";;
66 read -p "Flip need to be installed if you want to use that for programming, do you want to install it now? (Y/N) " res
68 [Yy]* ) cmd.exe /c $download_dir\\FlipInstaller.exe; break;;
70 * ) echo "Invalid answer";;
77 echo "Which USB drivers do you want to install?"
78 echo "(A)all - All supported drivers will be installed"
79 echo "(C)onnected - Only drivers for connected keyboards (in bootloader/flashing mode) will be installed"
80 echo "(F)force - Like all, but will also override existing drivers for connected keyboards"
81 echo "(N)one - No drivers will be installed, flashing your keyboard will most likely not work"
82 read -p "(A/C/F/N)? " res
84 [Aa]* ) install_drivers --all; break;;
85 [Cc]* ) install_drivers; break;;
86 [Ff]* ) install_drivers --all --force; break;;
88 * ) echo "Invalid answer";;