#!/bin/sh
+set -e
if [ -z "$1" ]; then
echo "Usage: $0 version" >&2
exit 1
fi
-cd "$HOME/VirtualBox VMs" && \
+cd "$HOME/VirtualBox VMs"
+rm -f VBoxGuestAdditions_*.iso Oracle_VM_VirtualBox_Extension_Pack-*.vbox-extpack
+
ww "http://download.virtualbox.org/virtualbox/$1/VBoxGuestAdditions_$1.iso" \
- "http://download.virtualbox.org/virtualbox/$1/Oracle_VM_VirtualBox_Extension_Pack-$1.vbox-extpack" &&
+ "http://download.virtualbox.org/virtualbox/$1/Oracle_VM_VirtualBox_Extension_Pack-$1.vbox-extpack"
exec sudo VBoxManage extpack install --replace \
+ --accept-license=33d7284dc4a0ece381196fda3cfe2ed0e1e8e7ed7f27b9a9ebc4ee22e24bd23c \
"Oracle_VM_VirtualBox_Extension_Pack-$1.vbox-extpack"