Skip to content

Instantly share code, notes, and snippets.

@dhrrgn
Created April 28, 2014 21:58
Show Gist options
  • Save dhrrgn/11385268 to your computer and use it in GitHub Desktop.
Save dhrrgn/11385268 to your computer and use it in GitHub Desktop.
Install Vagrant Plugins, but only if they aren't already installed.
#!/bin/sh
function install_vagrant_plugin {
if [[ -z $(vagrant plugin list | grep "$1") ]]; then
vagrant plugin install $1
else
echo "Vagrant Plugin '$1' already installed...skipping."
fi
}
install_vagrant_plugin "vagrant-vbguest"
install_vagrant_plugin "vagrant-hosts"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment