Forked from cbrunnkvist/upgrade_vbox_guest_additions.sh
Created
April 14, 2013 17:39
-
-
Save bravoecho/5383546 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# For simplicity's sake I dump this file in the project folder and execute | |
# it from the VM straight out of /vagrant -> could run as part of box/basebox buildout. | |
alias apt-get="sudo apt-get" | |
alias mount="sudo mount" | |
alias umount="sudo umount" | |
# Oh. Start by making .vbox_version contain the desired version string. | |
VBOX_VERSION=$(cat /home/vagrant/.vbox_version) | |
cd /tmp | |
apt-get -y install linux-headers-$(uname -r) | |
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso | |
mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt | |
sh /mnt/VBoxLinuxAdditions.run | |
umount /mnt | |
rm VBoxGuestAdditions_$VBOX_VERSION.iso | |
# Remove items used for building, since they aren't needed anymore | |
apt-get -y remove linux-headers-$(uname -r) | |
apt-get -y autoremove |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment