diff options
Diffstat (limited to 'util/win_shared_install.sh')
| -rw-r--r-- | util/win_shared_install.sh | 23 |
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 | ||
| 3 | download_dir=win_downloaded | ||
| 4 | wsl_download_dir=wsl_downloaded | ||
| 5 | |||
| 6 | function install_utils { | 3 | function 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 | ||
| 36 | function install_drivers { | 33 | function 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 | ||
| 43 | pushd "$dir" | 41 | pushd "$dir" |
| 44 | 42 | ||
| 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" | ||
| 48 | fi | ||
| 49 | |||
| 50 | if [ ! -d "$download_dir" ]; then | 43 | if [ ! -d "$download_dir" ]; then |
| 51 | install_utils | 44 | install_utils |
| 52 | else | 45 | else |
| @@ -61,15 +54,17 @@ else | |||
| 61 | done | 54 | done |
| 62 | fi | 55 | fi |
| 63 | 56 | ||
| 57 | pushd "$download_dir" | ||
| 64 | while true; do | 58 | while 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 |
| 72 | done | 66 | done |
| 67 | popd | ||
| 73 | 68 | ||
| 74 | 69 | ||
| 75 | while true; do | 70 | while true; do |
