]> git.donarmstrong.com Git - qmk_firmware.git/blob - util/macos_install.sh
Clean macos install script (#7186)
[qmk_firmware.git] / util / macos_install.sh
1 #!/bin/bash
2
3 util_dir=$(dirname "$0")
4
5 if ! brew --version >/dev/null 2>&1; then
6         echo "Error! Homebrew not installed or broken!"
7         echo -n "Would you like to install homebrew now? [y/n] "
8         while read -r ANSWER; do
9                 case $ANSWER in
10                 y | Y)
11                         /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
12                         break
13                         ;;
14                 n | N)
15                         exit 1
16                         ;;
17                 *)
18                         echo -n "Would you like to install homebrew now? [y/n] "
19                         ;;
20                 esac
21         done
22 fi
23
24 brew tap osx-cross/avr
25 brew tap PX4/homebrew-px4
26 brew update
27 brew install avr-gcc@8 gcc-arm-none-eabi dfu-programmer avrdude clang-format dfu-util python3
28 brew link --force avr-gcc@8
29 pip3 install -r "${util_dir}/../requirements.txt"