]> git.donarmstrong.com Git - qmk_firmware.git/blob - avr_setup.sh
Updated avr script and added notes to Vagrantfile
[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 \
15     base-devel \
16     avr-gcc \
17     avr-binutils \
18     avr-libc \
19     dfu-util
20
21 elif [[ -n "$(type -P apt-get)" ]]; then
22   # Debian and derivatives
23   apt-get update -y && apt-get upgrade -y
24   apt-get install -y \
25     build-essential \
26     gcc \
27     unzip \
28     wget \
29     zip \
30     gcc-avr \
31     binutils-avr \
32     avr-libc \
33     dfu-util
34   
35 elif [[ -n "$(type -P yum)" ]]; then
36   # Fedora, CentOS or RHEL and derivatives
37   yum -y makecache && yum -y update
38   yum -y install \
39     gcc \
40     glibc-headers \
41     kernel-devel \
42     kernel-headers \
43     make \
44     perl \
45     git \
46     wget \
47     avr-binutils \
48     avr-gcc \
49     avr-libc \
50     dfu-util
51
52 elif [[ -n "$(type -P zypper)" ]]; then
53   # openSUSE
54   zypper --non-interactive refresh  && zypper --non-interactive update
55   zypper --non-interactive install \
56     git \
57     make \
58     gcc \
59     kernel-devel \
60     patch \
61     wget \
62     dfu-programmer
63
64 fi