Created
December 5, 2015 07:41
-
-
Save marclambrichs/cd69bd8116f1d35c156d to your computer and use it in GitHub Desktop.
install plugins
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################################ | |
# check plugins | |
################################################################################ | |
required_plugins = %w(vagrant-hostmanager vagrant-hosts vagrant-vbguest) | |
plugins_to_install = required_plugins.select { |plugin| not Vagrant.has_plugin? plugin } | |
if not plugins_to_install.empty? | |
puts "Installing plugins: #{plugins_to_install.join(' ')}" | |
if system "vagrant plugin install #{plugins_to_install.join(' ')}" | |
exec "vagrant #{ARGV.join(' ')}" | |
else | |
abort "Installation of one or more plugins has failed. Aborting." | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment