Skip to content

Instantly share code, notes, and snippets.

@wwestenbrink
Last active September 3, 2019 11:43
Show Gist options
  • Save wwestenbrink/a6dc29e3c030453c3042 to your computer and use it in GitHub Desktop.
Save wwestenbrink/a6dc29e3c030453c3042 to your computer and use it in GitHub Desktop.
use brew (cask) to install/update virtualbox, vagrant & boot2docker
echo "Making sure homebrew is installed"
command -v brew >/dev/null 2>&1 || ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "Installing / updating homebrew packages & casks"
brew update
for pkg in docker boot2docker fig brew-cask; do
if ! brew list -1 | grep -q "^${pkg}\$"; then brew install ${pkg}; else brew upgrade ${pkg} || true; fi
done
for cask in virtualbox vagrant; do
brew cask install ${cask} --force
done
echo "Installing / updating vagrant plugins"
for plugin in vagrant-vbguest; do
if ! vagrant plugin list | grep -q "^${plugin}\$"; then vagrant plugin install ${plugin}; fi
done
vagrant plugin update
echo "Installing / updating boot2docker"
boot2docker init || true
boot2docker stop || true
boot2docker upgrade
boot2docker start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment