Skip to content

Instantly share code, notes, and snippets.

@eliaskousk eliaskousk/virtualbox.sh
Last active May 12, 2016

Embed
What would you like to do?
Check virtualbox install
#!/bin/bash
INSTALL_VIRTUALBOX=1
VBOX_PKG=virtualbox
VBOX_CHECK=$(dpkg-query -W --showformat='${Status}\n' virtualbox virtualbox-5.0 \
2>/dev/null | awk '{print $3;}' | grep "installed")
if [ "$VBOX_CHECK" != "" ]; then
echo "Virtualbox is already installed"
INSTALL_VIRTUALBOX=0
VBOX_PKG=
fi
# ...
sudo apt-get install $VBOX_PKG ansible nfs-kernel-server curl
# ...
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.