aboutsummaryrefslogtreecommitdiff
path: root/util/win_shared_install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'util/win_shared_install.sh')
-rw-r--r--util/win_shared_install.sh23
1 files changed, 9 insertions, 14 deletions
diff --git a/util/win_shared_install.sh b/util/win_shared_install.sh
index c30e28796..e02511cf3 100644
--- a/util/win_shared_install.sh
+++ b/util/win_shared_install.sh
@@ -1,13 +1,10 @@
1#!/bin/bash 1#!/bin/bash
2 2
3download_dir=win_downloaded
4wsl_download_dir=wsl_downloaded
5
6function install_utils { 3function install_utils {
7 rm -f -r $download_dir 4 rm -f -r "$download_dir"
8 mkdir $download_dir 5 mkdir "$download_dir"
9 6
10 pushd $download_dir 7 pushd "$download_dir"
11 8
12 echo "Installing dfu-programmer" 9 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' 10 wget 'http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip'
@@ -34,19 +31,15 @@ function install_utils {
34} 31}
35 32
36function install_drivers { 33function install_drivers {
37 pushd $download_dir 34 pushd "$download_dir"
35 cp -f "$dir/drivers.txt" .
38 echo 36 echo
39 cmd.exe /c "qmk_driver_installer.exe $1 $2 ..\\drivers.txt" 37 cmd.exe /c "qmk_driver_installer.exe $1 $2 drivers.txt"
40 popd > /dev/null 38 popd > /dev/null
41} 39}
42 40
43pushd "$dir" 41pushd "$dir"
44 42
45if [ -d "$wsl_download_dir" ]; then
46 echo "Renaming existing wsl_download_dir to win_download"
47 mv -f "$wsl_download_dir" "$download_dir"
48fi
49
50if [ ! -d "$download_dir" ]; then 43if [ ! -d "$download_dir" ]; then
51 install_utils 44 install_utils
52else 45else
@@ -61,15 +54,17 @@ else
61 done 54 done
62fi 55fi
63 56
57pushd "$download_dir"
64while true; do 58while true; do
65 echo 59 echo
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 60 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
67 case $res in 61 case $res in
68 [Yy]* ) cmd.exe /c $download_dir\\FlipInstaller.exe; break;; 62 [Yy]* ) cmd.exe /c FlipInstaller.exe; break;;
69 [Nn]* ) break;; 63 [Nn]* ) break;;
70 * ) echo "Invalid answer";; 64 * ) echo "Invalid answer";;
71 esac 65 esac
72done 66done
67popd
73 68
74 69
75while true; do 70while true; do