aboutsummaryrefslogtreecommitdiffstats
path: root/util
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 /util
parent32fc4da4a7c0ebaaa9404971dcafba0c67220507 (diff)
downloadfirmware-d47db637edb4215f2313d59b6646e5e3dbb97e7c.tar.gz
firmware-d47db637edb4215f2313d59b6646e5e3dbb97e7c.tar.bz2
firmware-d47db637edb4215f2313d59b6646e5e3dbb97e7c.zip
Use home directory for download on msys2
Diffstat (limited to 'util')
-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 @@
dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
echo "Installing dependencies needed for the installation (quazip)"
-pacman -S msys/unzip
+pacman --needed -S msys/unzip
+
+export download_dir=~/qmk_utils
source "$dir/win_shared_install.sh"
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 @@
#!/bin/bash
-download_dir=win_downloaded
-wsl_download_dir=wsl_downloaded
-
function install_utils {
- rm -f -r $download_dir
- mkdir $download_dir
+ rm -f -r "$download_dir"
+ mkdir "$download_dir"
- pushd $download_dir
+ pushd "$download_dir"
echo "Installing dfu-programmer"
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 {
}
function install_drivers {
- pushd $download_dir
+ pushd "$download_dir"
+ cp -f "$dir/drivers.txt" .
echo
- cmd.exe /c "qmk_driver_installer.exe $1 $2 ..\\drivers.txt"
+ cmd.exe /c "qmk_driver_installer.exe $1 $2 drivers.txt"
popd > /dev/null
}
pushd "$dir"
-if [ -d "$wsl_download_dir" ]; then
- echo "Renaming existing wsl_download_dir to win_download"
- mv -f "$wsl_download_dir" "$download_dir"
-fi
-
if [ ! -d "$download_dir" ]; then
install_utils
else
@@ -61,15 +54,17 @@ else
done
fi
+pushd "$download_dir"
while true; do
echo
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
case $res in
- [Yy]* ) cmd.exe /c $download_dir\\FlipInstaller.exe; break;;
+ [Yy]* ) cmd.exe /c FlipInstaller.exe; break;;
[Nn]* ) break;;
* ) echo "Invalid answer";;
esac
done
+popd
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
echo "Installing dependencies needed for the installation (unzip, wget)"
echo "This will ask for the sudo password"
sudo apt-get install unzip wget
+
+download_dir=wsl_downloaded
+
source "$dir/win_shared_install.sh"
echo