]> git.donarmstrong.com Git - qmk_firmware.git/blob - avr_setup.sh
Adding update of vagrant VM every time it is booted
[qmk_firmware.git] / avr_setup.sh
1 #!/usr/bin/env bash
2 # This script will attempt to setup the Linux dependencies for compiling QMK/TMK
3
4 # This could probably go much lower, but since we are including an Arch vagrant,
5 # making it the first match makes sense
6
7 if [[ -n "$(type -P pacman )" ]]; then
8   # Arch linux and derivatives like Apricity
9   # Future improvements:
10   # Allow user to speed up package installs using powerpill/wget tweaks
11   # Always run the pacman mirror update script if possible when vagrant comes up
12   # This will ensure that users never get stalled on a horribly slow mirror
13   pacman -Syyu --needed --noconfirm
14   pacman -S --needed --noconfirm base-devel avr-gcc avr-binutils avr-libc dfu-util
15
16 elif [[ -n "$(type -P apt-get)" ]]; then
17   # Debian and derivatives
18   apt-get update -y && apt-get upgrade -y
19   apt-get install -y build-essential gcc unzip wget zip gcc-avr binutils-avr avr-libc
20   
21 elif [[ -n "$(type -P yum)" ]]; then
22   # Fedora, CentOS or RHEL and derivatives
23   yum -y makecache && yum -y update
24   yum -y install gcc glibc-headers kernel-devel kernel-headers make perl git wget
25
26 elif [[ -n "$(type -P zypper)" ]]; then
27   # openSUSE
28   zypper refresh --non-interactive && zypper update --non-interactive
29   zypper --non-interactive install git make gcc kernel-devel patch wget
30
31 fi