diff options
author | Erez Zukerman <bulk@ezuk.org> | 2016-01-18 19:38:32 -0500 |
---|---|---|
committer | Erez Zukerman <bulk@ezuk.org> | 2016-01-18 19:38:32 -0500 |
commit | 393f26f250f704933882d93312d19685ec55801f (patch) | |
tree | 7b8ca5e59d8d13d06ee5f6e164e48ee1cb4f05c1 /avr_setup.sh | |
parent | 0c3aed93db9f07535a72b4c8d96e7aee5f23b085 (diff) | |
parent | 6774167900c93165fe39c80c47c566d6779021f8 (diff) |
Merge pull request #73 from dragon788/dragon_mod
Requesting some comments and review on my changes
Diffstat (limited to 'avr_setup.sh')
-rw-r--r-- | avr_setup.sh | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/avr_setup.sh b/avr_setup.sh new file mode 100644 index 0000000000..34a8a3281b --- /dev/null +++ b/avr_setup.sh @@ -0,0 +1,72 @@ +#!/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 + # 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 + pacman -S --needed --noconfirm \ + base-devel \ + avr-gcc \ + avr-binutils \ + avr-libc \ + dfu-util + +elif [[ -n "$(type -P apt-get)" ]]; then + # Debian and derivatives + # 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" + # }} + apt-get install -y \ + build-essential \ + gcc \ + unzip \ + wget \ + zip \ + gcc-avr \ + binutils-avr \ + avr-libc \ + dfu-util + +elif [[ -n "$(type -P yum)" ]]; then + # Fedora, CentOS or RHEL and derivatives + yum -y makecache && yum -y update + yum -y install \ + gcc \ + glibc-headers \ + kernel-devel \ + kernel-headers \ + make \ + perl \ + git \ + wget \ + avr-binutils \ + avr-gcc \ + avr-libc \ + dfu-util + +elif [[ -n "$(type -P zypper)" ]]; then + # openSUSE + zypper --non-interactive refresh && zypper --non-interactive update + zypper --non-interactive install \ + git \ + make \ + gcc \ + kernel-devel \ + patch \ + wget \ + dfu-programmer + +fi |