mirror of
https://github.com/openstenoproject/qmk
synced 2024-11-10 18:49:08 +00:00
Install arm toolchain
This commit is contained in:
parent
b8c363099b
commit
76bd0d3e18
1 changed files with 32 additions and 3 deletions
|
@ -3,12 +3,11 @@
|
|||
dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
|
||||
download_dir=~/qmk_utils
|
||||
avrtools=avr8-gnu-toolchain
|
||||
armtools=gcc-arm-none-eabi
|
||||
|
||||
echo "Installing dependencies needed for the installation (quazip)"
|
||||
pacman --needed -S msys/unzip msys/p7zip
|
||||
|
||||
|
||||
|
||||
source "$dir/win_shared_install.sh"
|
||||
|
||||
function install_avr {
|
||||
|
@ -18,8 +17,13 @@ function install_avr {
|
|||
rm avr8-gnu-toolchain-installer-3.5.4.91-win32.any.x86.exe
|
||||
}
|
||||
|
||||
pushd "$download_dir"
|
||||
function install_arm {
|
||||
wget -O gcc-arm-none-eabi.zip "https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-win32.zip?product=GNU%20ARM%20Embedded%20Toolchain,ZIP,,Windows,6-2017-q2-update"
|
||||
unzip -d gcc-arm-none-eabi gcc-arm-none-eabi.zip
|
||||
rm gcc-arm-none-eabi.zip
|
||||
}
|
||||
|
||||
pushd "$download_dir"
|
||||
|
||||
if [ ! -d "$avrtools" ]; then
|
||||
while true; do
|
||||
|
@ -45,6 +49,31 @@ else
|
|||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if [ ! -d "$armtools" ]; then
|
||||
while true; do
|
||||
echo
|
||||
echo "The ARM toolchain is not installed."
|
||||
echo "This is needed for building ARM based keboards."
|
||||
read -p "Do you want to install it? (Y/N) " res
|
||||
case $res in
|
||||
[Yy]* ) install_arm; break;;
|
||||
[Nn]* ) break;;
|
||||
* ) echo "Invalid answer";;
|
||||
esac
|
||||
done
|
||||
else
|
||||
while true; do
|
||||
echo
|
||||
echo "The ARM toolchain is already installed"
|
||||
read -p "Do you want to reinstall? (Y/N) " res
|
||||
case $res in
|
||||
[Yy]* ) install_arm; break;;
|
||||
[Nn]* ) break;;
|
||||
* ) echo "Invalid answer";;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
popd
|
||||
|
||||
echo
|
||||
|
|
Loading…
Reference in a new issue