Skip to content

Instantly share code, notes, and snippets.

@a-chernykh
Created January 8, 2015 22:54
Show Gist options
  • Save a-chernykh/38999f9722f21595d9bb to your computer and use it in GitHub Desktop.
Save a-chernykh/38999f9722f21595d9bb to your computer and use it in GitHub Desktop.
Package plugins with vagrant
needs_restart = false
plugins = {
'vagrant-aws' => '0.5.0',
'vagrant-s3auth' => '0.1.0',
'vagrant-bindfs' => '0.3.2',
}
plugins.each do |plugin, version|
unless Vagrant.has_plugin?(plugin)
system("vagrant plugin install #{plugin} --plugin-version #{version}") || exit!
needs_restart = true
end
exit system('vagrant', *ARGV) if needs_restart
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment