2016-01-04 10:21:30 +06:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# This script will attempt to setup the Linux dependencies for compiling QMK/TMK
|
|
|
|
|
|
|
|
# This could probably go much lower, but since we are including an Arch vagrant,
|
|
|
|
# making it the first match makes sense
|
|
|
|
|
|
|
|
if [[ -n "$(type -P pacman )" ]]; then
|
|
|
|
# Arch linux and derivatives like Apricity
|
2016-01-06 10:39:49 +06:00
|
|
|
# Future improvements:
|
|
|
|
# Allow user to speed up package installs using powerpill/wget tweaks
|
|
|
|
# Always run the pacman mirror update script if possible when vagrant comes up
|
|
|
|
# This will ensure that users never get stalled on a horribly slow mirror
|
|
|
|
pacman -Syyu --needed --noconfirm
|
2016-01-13 09:41:43 +06:00
|
|
|
pacman -S --needed --noconfirm \
|
|
|
|
base-devel \
|
|
|
|
avr-gcc \
|
|
|
|
avr-binutils \
|
|
|
|
avr-libc \
|
|
|
|
dfu-util
|
2016-01-04 10:21:30 +06:00
|
|
|
|
|
|
|
elif [[ -n "$(type -P apt-get)" ]]; then
|
|
|
|
# Debian and derivatives
|
2016-01-18 01:12:37 +06:00
|
|
|
# This block performs completely non-interactive updates {{
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
export DEBCONF_NONINTERACTIVE_SEEN=true
|
|
|
|
echo "grub-pc hold" | dpkg --set-selections
|
|
|
|
apt-get -y update
|
|
|
|
apt-get -y --allow-unauthenticated upgrade \
|
|
|
|
-o Dpkg::Options::="--force-confdef" \
|
|
|
|
-o Dpkg::Options::="--force-confold"
|
|
|
|
# }}
|
2016-01-13 09:41:43 +06:00
|
|
|
apt-get install -y \
|
|
|
|
build-essential \
|
|
|
|
gcc \
|
|
|
|
unzip \
|
|
|
|
wget \
|
|
|
|
zip \
|
|
|
|
gcc-avr \
|
|
|
|
binutils-avr \
|
|
|
|
avr-libc \
|
2016-06-07 22:41:55 +06:00
|
|
|
dfu-programmer \
|
2016-01-13 09:41:43 +06:00
|
|
|
dfu-util
|
2016-06-07 22:41:55 +06:00
|
|
|
|
2016-01-04 10:21:30 +06:00
|
|
|
elif [[ -n "$(type -P yum)" ]]; then
|
|
|
|
# Fedora, CentOS or RHEL and derivatives
|
2016-01-06 10:39:49 +06:00
|
|
|
yum -y makecache && yum -y update
|
2016-01-13 09:41:43 +06:00
|
|
|
yum -y install \
|
|
|
|
gcc \
|
|
|
|
glibc-headers \
|
|
|
|
kernel-devel \
|
|
|
|
kernel-headers \
|
|
|
|
make \
|
|
|
|
perl \
|
|
|
|
git \
|
|
|
|
wget \
|
|
|
|
avr-binutils \
|
|
|
|
avr-gcc \
|
|
|
|
avr-libc \
|
2016-06-07 22:41:55 +06:00
|
|
|
dfu-programmer \
|
2016-01-13 09:41:43 +06:00
|
|
|
dfu-util
|
2016-01-04 10:21:30 +06:00
|
|
|
|
|
|
|
elif [[ -n "$(type -P zypper)" ]]; then
|
|
|
|
# openSUSE
|
2016-01-16 23:44:27 +06:00
|
|
|
zypper --non-interactive refresh && zypper --non-interactive update
|
2016-01-13 09:41:43 +06:00
|
|
|
zypper --non-interactive install \
|
|
|
|
git \
|
|
|
|
make \
|
|
|
|
gcc \
|
|
|
|
kernel-devel \
|
|
|
|
patch \
|
|
|
|
wget \
|
2016-01-16 23:44:27 +06:00
|
|
|
dfu-programmer
|
2016-01-04 10:21:30 +06:00
|
|
|
|
|
|
|
fi
|