aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2017-07-11 16:11:37 +0300
committerFred Sundvik <fsundvik@gmail.com>2017-07-11 16:11:37 +0300
commitd47db637edb4215f2313d59b6646e5e3dbb97e7c (patch)
treea73668657e5349723e72e351252fce4bf2d471b7
parent32fc4da4a7c0ebaaa9404971dcafba0c67220507 (diff)
downloadqmk_firmware-d47db637edb4215f2313d59b6646e5e3dbb97e7c.tar.gz
qmk_firmware-d47db637edb4215f2313d59b6646e5e3dbb97e7c.zip
Use home directory for download on msys2
-rw-r--r--util/msys2_install.sh4
-rw-r--r--util/win_shared_install.sh23
-rw-r--r--util/wsl_install.sh3
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 @@
3dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) 3dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
4 4
5echo "Installing dependencies needed for the installation (quazip)" 5echo "Installing dependencies needed for the installation (quazip)"
6pacman -S msys/unzip 6pacman --needed -S msys/unzip
7
8export download_dir=~/qmk_utils
7 9
8source "$dir/win_shared_install.sh" 10source "$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
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
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
28echo "Installing dependencies needed for the installation (unzip, wget)" 28echo "Installing dependencies needed for the installation (unzip, wget)"
29echo "This will ask for the sudo password" 29echo "This will ask for the sudo password"
30sudo apt-get install unzip wget 30sudo apt-get install unzip wget
31
32download_dir=wsl_downloaded
33
31source "$dir/win_shared_install.sh" 34source "$dir/win_shared_install.sh"
32 35
33echo 36echo