diff options
| author | dragon788 <dragon788@users.noreply.github.com> | 2016-01-05 22:39:49 -0600 |
|---|---|---|
| committer | dragon788 <dragon788@users.noreply.github.com> | 2016-01-05 22:39:49 -0600 |
| commit | ee424f86081c538fc74c3e9b50c7b1eb595b6e58 (patch) | |
| tree | 39b2b5d62a8f73e546ae1c5f3d916db3028615bd | |
| parent | ab7d6dca4106bae6876b46f06fe157478a62ecda (diff) | |
| download | qmk_firmware-ee424f86081c538fc74c3e9b50c7b1eb595b6e58.tar.gz qmk_firmware-ee424f86081c538fc74c3e9b50c7b1eb595b6e58.zip | |
Adding update of vagrant VM every time it is booted
| -rw-r--r-- | Vagrantfile | 50 | ||||
| -rw-r--r-- | avr_setup.sh | 10 |
2 files changed, 46 insertions, 14 deletions
diff --git a/Vagrantfile b/Vagrantfile index e1082a08d..788e014de 100644 --- a/Vagrantfile +++ b/Vagrantfile | |||
| @@ -2,8 +2,25 @@ | |||
| 2 | # vi: set ft=ruby : | 2 | # vi: set ft=ruby : |
| 3 | 3 | ||
| 4 | Vagrant.configure(2) do |config| | 4 | Vagrant.configure(2) do |config| |
| 5 | # You can only have one config.vm.box uncommented at a time | ||
| 6 | |||
| 7 | # Comment this and uncomment another if you don't want to use the minimal Arch box | ||
| 5 | config.vm.box = "dragon788/arch-ala-elasticdog" | 8 | config.vm.box = "dragon788/arch-ala-elasticdog" |
| 6 | 9 | ||
| 10 | # VMware/Virtualbox 64 bit | ||
| 11 | # config.vm.box = "phusion/ubuntu-14.04-amd64" | ||
| 12 | # | ||
| 13 | # VMware/Virtualbox 64 bit | ||
| 14 | # config.vm.box = "puphpet/centos65-x64" | ||
| 15 | # | ||
| 16 | # VMware/Virtualbox 64 bit | ||
| 17 | # config.vm.box = "bento/opensuse-13.2-x86_64" | ||
| 18 | # | ||
| 19 | # Virtualbox only | ||
| 20 | # config.vm.box = "bento/opensuse-13.2-i386" | ||
| 21 | # config.vm.box = "" | ||
| 22 | # config.vm.box = "" | ||
| 23 | |||
| 7 | # This section allows you to customize the Virtualbox VM | 24 | # This section allows you to customize the Virtualbox VM |
| 8 | # settings, ie showing the GUI or upping the memory | 25 | # settings, ie showing the GUI or upping the memory |
| 9 | # or cores if desired | 26 | # or cores if desired |
| @@ -21,25 +38,32 @@ Vagrant.configure(2) do |config| | |||
| 21 | config.vm.provider "vmware" do |vmw| | 38 | config.vm.provider "vmware" do |vmw| |
| 22 | # Hide the VMware GUI when booting the machine | 39 | # Hide the VMware GUI when booting the machine |
| 23 | vmw.gui = false | 40 | vmw.gui = false |
| 24 | 41 | ||
| 25 | # Customize the amount of memory on the VM: | 42 | # Customize the amount of memory on the VM: |
| 26 | vmw.memory = "512" | 43 | vmw.memory = "512" |
| 27 | end | 44 | end |
| 28 | 45 | ||
| 29 | # This ensures the system always gets the latest updates when powered on | 46 | # This script ensures the required packages for AVR programming are installed |
| 47 | # It also ensures the system always gets the latest updates when powered on | ||
| 30 | # If this causes issues you can run a 'vagrant destroy' and then | 48 | # If this causes issues you can run a 'vagrant destroy' and then |
| 31 | # comment out these three lines and run 'vagrant up' to get a working | 49 | # add a # before ,args: and run 'vagrant up' to get a working |
| 32 | # non-updated box and then attempt to troubleshoot after it has started | 50 | # non-updated box and then attempt to troubleshoot or open a Github issue |
| 33 | # | ||
| 34 | config.vm.provision "shell", run: "always", inline: <<-SHELL | ||
| 35 | sudo pacman -Syu --needed --noconfirm | ||
| 36 | SHELL | ||
| 37 | 51 | ||
| 38 | # Allow user to speed up package installs using powerpill/wget tweaks | 52 | config.vm.provision "shell", run: "always", path: "avr_setup.sh", args: "-update" |
| 39 | # Always run the pacman mirror update script if possible when vagrant comes up | 53 | |
| 40 | # This will ensure that users never get stalled on a horribly slow mirror | 54 | config.vm.post_up_message = """ |
| 55 | Log into the VM using 'vagrant ssh' on OSX or from Git Bash (Win) | ||
| 56 | or 'vagrant ssh-config' and Putty or another SSH tool | ||
| 41 | 57 | ||
| 42 | config.vm.provision "shell", path: "avr_setup.sh" | 58 | Change directory to the keyboard you wish to program |
| 59 | optionally and modify your layout, | ||
| 60 | then run 'make clean' | ||
| 61 | and then 'make' to compile the .eep and .hex files. | ||
| 62 | |||
| 63 | Or you can copy and paste the line below. | ||
| 64 | |||
| 65 | cd /vagrant; cd keyboard; cd ergodox_ez; make clean; make | ||
| 66 | |||
| 43 | 67 | ||
| 44 | config.vm.post_up_message = """Change directory to the keyboard you wish to program and modify your layout, then run 'make clean' and 'make' to compile the .eep and .hex files.""" | 68 | """ |
| 45 | end | 69 | end |
diff --git a/avr_setup.sh b/avr_setup.sh index ff4153ba3..cd7412d74 100644 --- a/avr_setup.sh +++ b/avr_setup.sh | |||
| @@ -6,18 +6,26 @@ | |||
| 6 | 6 | ||
| 7 | if [[ -n "$(type -P pacman )" ]]; then | 7 | if [[ -n "$(type -P pacman )" ]]; then |
| 8 | # Arch linux and derivatives like Apricity | 8 | # Arch linux and derivatives like Apricity |
| 9 | pacman -S --needed --noconfirm base-devel avr-gcc avr-binutils avr-libc dfu-utils | 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 | ||
| 10 | 15 | ||
| 11 | elif [[ -n "$(type -P apt-get)" ]]; then | 16 | elif [[ -n "$(type -P apt-get)" ]]; then |
| 12 | # Debian and derivatives | 17 | # Debian and derivatives |
| 18 | apt-get update -y && apt-get upgrade -y | ||
| 13 | apt-get install -y build-essential gcc unzip wget zip gcc-avr binutils-avr avr-libc | 19 | apt-get install -y build-essential gcc unzip wget zip gcc-avr binutils-avr avr-libc |
| 14 | 20 | ||
| 15 | elif [[ -n "$(type -P yum)" ]]; then | 21 | elif [[ -n "$(type -P yum)" ]]; then |
| 16 | # Fedora, CentOS or RHEL and derivatives | 22 | # Fedora, CentOS or RHEL and derivatives |
| 23 | yum -y makecache && yum -y update | ||
| 17 | yum -y install gcc glibc-headers kernel-devel kernel-headers make perl git wget | 24 | yum -y install gcc glibc-headers kernel-devel kernel-headers make perl git wget |
| 18 | 25 | ||
| 19 | elif [[ -n "$(type -P zypper)" ]]; then | 26 | elif [[ -n "$(type -P zypper)" ]]; then |
| 20 | # openSUSE | 27 | # openSUSE |
| 28 | zypper refresh --non-interactive && zypper update --non-interactive | ||
| 21 | zypper --non-interactive install git make gcc kernel-devel patch wget | 29 | zypper --non-interactive install git make gcc kernel-devel patch wget |
| 22 | 30 | ||
| 23 | fi | 31 | fi |
