Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install VirtualBox on OSX
#!/bin/bash
# install lastest virtualbox and extenion pack releases
VBOX_LATEST_VERSION=$(curl http://download.virtualbox.org/virtualbox/LATEST.TXT)
VBOX_LATEST_FILE_OSX=$(wget -q http://download.virtualbox.org/virtualbox/${VBOX_LATEST_VERSION}/MD5SUMS -O- | grep -i "OSX.dmg" | cut -d"*" -f2)
wget -c http://download.virtualbox.org/virtualbox/${VBOX_LATEST_VERSION}/${VBOX_LATEST_FILE_OSX} -O /tmp/${VBOX_LATEST_FILE_OSX}
hdiutil mount /tmp/${VBOX_LATEST_FILE_OSX}
sudo installer -pkg /Volumes/VirtualBox/VirtualBox.pkg -target /
hdiutil unmount /Volumes/VirtualBox
wget -c http://download.virtualbox.org/virtualbox/${VBOX_LATEST_VERSION}/Oracle_VM_VirtualBox_Extension_Pack-${VBOX_LATEST_VERSION}.vbox-extpack -O /tmp/Oracle_VM_VirtualBox_Extension_Pack-${VBOX_LATEST_VERSION}.vbox-extpack
sudo VBoxManage extpack uninstall "Oracle VM VirtualBox Extension Pack"
sudo VBoxManage extpack cleanup
sudo VBoxManage extpack install /tmp/Oracle_VM_VirtualBox_Extension_Pack-${VBOX_LATEST_VERSION}.vbox-extpack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.