From ab7d6dca4106bae6876b46f06fe157478a62ecda Mon Sep 17 00:00:00 2001 From: dragon788 Date: Sun, 3 Jan 2016 22:21:30 -0600 Subject: Adding Vagrantfile for easier compile environment setup --- avr_setup.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 avr_setup.sh (limited to 'avr_setup.sh') diff --git a/avr_setup.sh b/avr_setup.sh new file mode 100644 index 0000000000..ff4153ba37 --- /dev/null +++ b/avr_setup.sh @@ -0,0 +1,23 @@ +#!/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 + pacman -S --needed --noconfirm base-devel avr-gcc avr-binutils avr-libc dfu-utils + +elif [[ -n "$(type -P apt-get)" ]]; then + # Debian and derivatives + apt-get install -y build-essential gcc unzip wget zip gcc-avr binutils-avr avr-libc + +elif [[ -n "$(type -P yum)" ]]; then + # Fedora, CentOS or RHEL and derivatives + yum -y install gcc glibc-headers kernel-devel kernel-headers make perl git wget + +elif [[ -n "$(type -P zypper)" ]]; then + # openSUSE + zypper --non-interactive install git make gcc kernel-devel patch wget + +fi -- cgit v1.2.3 From ee424f86081c538fc74c3e9b50c7b1eb595b6e58 Mon Sep 17 00:00:00 2001 From: dragon788 Date: Tue, 5 Jan 2016 22:39:49 -0600 Subject: Adding update of vagrant VM every time it is booted --- avr_setup.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'avr_setup.sh') diff --git a/avr_setup.sh b/avr_setup.sh index ff4153ba37..cd7412d748 100644 --- a/avr_setup.sh +++ b/avr_setup.sh @@ -6,18 +6,26 @@ if [[ -n "$(type -P pacman )" ]]; then # Arch linux and derivatives like Apricity - pacman -S --needed --noconfirm base-devel avr-gcc avr-binutils avr-libc dfu-utils + # 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 + apt-get update -y && apt-get upgrade -y apt-get install -y build-essential gcc unzip wget zip gcc-avr binutils-avr avr-libc 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 elif [[ -n "$(type -P zypper)" ]]; then # openSUSE + zypper refresh --non-interactive && zypper update --non-interactive zypper --non-interactive install git make gcc kernel-devel patch wget fi -- cgit v1.2.3 From 71ee3eb2e7fdddbfac4443c5f8522a2f620f86e2 Mon Sep 17 00:00:00 2001 From: dragon788 Date: Tue, 12 Jan 2016 21:41:43 -0600 Subject: All dfu dependencies in place, multi-line syntax to make it easy to add/read --- avr_setup.sh | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) (limited to 'avr_setup.sh') diff --git a/avr_setup.sh b/avr_setup.sh index cd7412d748..15f3118c05 100644 --- a/avr_setup.sh +++ b/avr_setup.sh @@ -11,21 +11,54 @@ if [[ -n "$(type -P pacman )" ]]; then # 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 + pacman -S --needed --noconfirm \ + base-devel \ + avr-gcc \ + avr-binutils \ + avr-libc \ + dfu-util elif [[ -n "$(type -P apt-get)" ]]; then # Debian and derivatives apt-get update -y && apt-get upgrade -y - apt-get install -y build-essential gcc unzip wget zip gcc-avr binutils-avr avr-libc + 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 + 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 refresh --non-interactive && zypper update --non-interactive - zypper --non-interactive install git make gcc kernel-devel patch wget + zypper --non-interactive install \ + git \ + make \ + gcc \ + kernel-devel \ + patch \ + wget \ + dfu-util fi -- cgit v1.2.3 From 987ac16afde0539dca1f158c1f2186bcb3f26c76 Mon Sep 17 00:00:00 2001 From: dragon788 Date: Sat, 16 Jan 2016 11:44:27 -0600 Subject: Updated avr script and added notes to Vagrantfile --- avr_setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'avr_setup.sh') diff --git a/avr_setup.sh b/avr_setup.sh index 15f3118c05..4b25280852 100644 --- a/avr_setup.sh +++ b/avr_setup.sh @@ -51,7 +51,7 @@ elif [[ -n "$(type -P yum)" ]]; then elif [[ -n "$(type -P zypper)" ]]; then # openSUSE - zypper refresh --non-interactive && zypper update --non-interactive + zypper --non-interactive refresh && zypper --non-interactive update zypper --non-interactive install \ git \ make \ @@ -59,6 +59,6 @@ elif [[ -n "$(type -P zypper)" ]]; then kernel-devel \ patch \ wget \ - dfu-util + dfu-programmer fi -- cgit v1.2.3 From 67f7507d7c8e9db8f1bb135a272a03fd4619b288 Mon Sep 17 00:00:00 2001 From: dragon788 Date: Sun, 17 Jan 2016 13:12:37 -0600 Subject: Fixing Debian/Ubuntu updates to be completely non-interactive --- avr_setup.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'avr_setup.sh') diff --git a/avr_setup.sh b/avr_setup.sh index 4b25280852..34a8a3281b 100644 --- a/avr_setup.sh +++ b/avr_setup.sh @@ -20,7 +20,15 @@ if [[ -n "$(type -P pacman )" ]]; then elif [[ -n "$(type -P apt-get)" ]]; then # Debian and derivatives - apt-get update -y && apt-get upgrade -y + # 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 \ -- cgit v1.2.3