From 8db557778930f083610c0d0a776cd7fa559d0c34 Mon Sep 17 00:00:00 2001 From: Brian Zalewski <59970525+ProfessorManhattan@users.noreply.github.com> Date: Thu, 15 Jun 2023 01:10:55 +0000 Subject: [PATCH] Latest --- .../universal/run_onchange_after_46_virtualbox.sh.tmpl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/home/.chezmoiscripts/universal/run_onchange_after_46_virtualbox.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_46_virtualbox.sh.tmpl index 3baa3ee8..30aa0b4b 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_46_virtualbox.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_46_virtualbox.sh.tmpl @@ -27,12 +27,14 @@ if command -v VirtualBox > /dev/null; then ### Download extension pack logg info 'Downloading VirtualBox extension pack' curl -sSL 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 + -o /tmp/vbox/Oracle_VM_VirtualBox_Extension_Pack-$VBOX_VERSION.vbox-extpack || logg error 'Failed to download the VirtualBox extension pack so the extension pack installation will be skipped' ### Install extension pack - logg info 'Installing VirtualBox extension pack' - echo 'y' | sudo VBoxManage extpack install --replace /tmp/vbox/Oracle_VM_VirtualBox_Extension_Pack-$VBOX_VERSION.vbox-extpack - logg success 'Successfully installed VirtualBox extension pack' + if [ -f /tmp/vbox/Oracle_VM_VirtualBox_Extension_Pack-$VBOX_VERSION.vbox-extpack ]; then + logg info 'Installing VirtualBox extension pack' + echo 'y' | sudo VBoxManage extpack install --replace /tmp/vbox/Oracle_VM_VirtualBox_Extension_Pack-$VBOX_VERSION.vbox-extpack + logg success 'Successfully installed VirtualBox extension pack' + fi else logg info 'VirtualBox Extension pack is already installed' fi