22 lines
898 B
Cheetah
22 lines
898 B
Cheetah
|
{{- if ne .host.distro.family "windows" -}}
|
||
|
#!/usr/bin/env bash
|
||
|
|
||
|
{{ includeTemplate "universal/profile" }}
|
||
|
{{ includeTemplate "universal/logg" }}
|
||
|
|
||
|
### Only run logic if VirtualBox is installed
|
||
|
if command -v VirtualBox > /dev/null; then
|
||
|
###Install VirtualBox Extension pack
|
||
|
VBOX_VERSION=$(VirtualBox --help | head -n 1 | cut -f 6 -d' ')
|
||
|
VBOX_VERSION=${VBOX_VERSION//v}
|
||
|
mkdir -p /usr/lib/virtualbox/ExtensionPacks
|
||
|
cd /tmp/vbox
|
||
|
curl https://download.virtualbox.org/virtualbox/$VBOX_VERSION/Oracle_VM_VirtualBox_Extension_Pack-$VBOX_VERSION.vbox-extpack \
|
||
|
-o /tmp/vbox/Oracle_VM_VirtualBox_Extension_Pack-$VBOX_VERSION.vbox-extpack
|
||
|
echo 'y' | VBoxManage extpack install --replace /tmp/vbox/Oracle_VM_VirtualBox_Extension_Pack-$VBOX_VERSION.vbox-extpack
|
||
|
else
|
||
|
logg warn 'VirtualBox is not installed so VirtualBox Extension pack will not be installed'
|
||
|
fi
|
||
|
|
||
|
{{ end -}}
|