Sunday, June 22, 2014

Automatic VirtualBox extpack upgrade on Linux host

Can't be arsed to write something here ...
#!/bin/bash
version=$(vboxmanage -v)
echo Version: $version
var1=$(echo $version | cut -d 'r' -f 1)
echo Main   : $var1
var2=$(echo $version | cut -d 'r' -f 2)
echo Build  : $var2
file="Oracle_VM_VirtualBox_Extension_Pack-$var1-$var2.vbox-extpack"
echo Extpack: $file
wget http://download.virtualbox.org/virtualbox/$var1/$file -O /tmp/$file
VBoxManage extpack install /tmp/$file --replace