diff options
| author | Fred Sundvik <fsundvik@gmail.com> | 2017-07-11 16:11:37 +0300 |
|---|---|---|
| committer | Fred Sundvik <fsundvik@gmail.com> | 2017-07-11 16:11:37 +0300 |
| commit | d47db637edb4215f2313d59b6646e5e3dbb97e7c (patch) | |
| tree | a73668657e5349723e72e351252fce4bf2d471b7 | |
| parent | 32fc4da4a7c0ebaaa9404971dcafba0c67220507 (diff) | |
| download | qmk_firmware-d47db637edb4215f2313d59b6646e5e3dbb97e7c.tar.gz qmk_firmware-d47db637edb4215f2313d59b6646e5e3dbb97e7c.zip | |
Use home directory for download on msys2
| -rw-r--r-- | util/msys2_install.sh | 4 | ||||
| -rw-r--r-- | util/win_shared_install.sh | 23 | ||||
| -rw-r--r-- | util/wsl_install.sh | 3 |
3 files changed, 15 insertions, 15 deletions
diff --git a/util/msys2_install.sh b/util/msys2_install.sh index b59eac0ca..aed6c42bd 100644 --- a/util/msys2_install.sh +++ b/util/msys2_install.sh | |||
| @@ -3,7 +3,9 @@ | |||
| 3 | dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) | 3 | dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) |
| 4 | 4 | ||
| 5 | echo "Installing dependencies needed for the installation (quazip)" | 5 | echo "Installing dependencies needed for the installation (quazip)" |
| 6 | pacman -S msys/unzip | 6 | pacman --needed -S msys/unzip |
| 7 | |||
| 8 | export download_dir=~/qmk_utils | ||
| 7 | 9 | ||
| 8 | source "$dir/win_shared_install.sh" | 10 | source "$dir/win_shared_install.sh" |
| 9 | 11 | ||
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 |
diff --git a/util/wsl_install.sh b/util/wsl_install.sh index 5da64b1d0..b593c6e77 100644 --- a/util/wsl_install.sh +++ b/util/wsl_install.sh | |||
| @@ -28,6 +28,9 @@ done | |||
| 28 | echo "Installing dependencies needed for the installation (unzip, wget)" | 28 | echo "Installing dependencies needed for the installation (unzip, wget)" |
| 29 | echo "This will ask for the sudo password" | 29 | echo "This will ask for the sudo password" |
| 30 | sudo apt-get install unzip wget | 30 | sudo apt-get install unzip wget |
| 31 | |||
| 32 | download_dir=wsl_downloaded | ||
| 33 | |||
| 31 | source "$dir/win_shared_install.sh" | 34 | source "$dir/win_shared_install.sh" |
| 32 | 35 | ||
| 33 | echo | 36 | echo |
