diff --git a/brew/install.sh b/brew/install.sh new file mode 100644 index 0000000..10cd115 --- /dev/null +++ b/brew/install.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Abort on error +set -e + +# Checks if Homebrew is installed +if test ! $(which brew); then + echo "Installing Homebrew..."; + NONINTERACTIVE=1 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +else + echo "Homebrew is already installed..."; +fi + +# Install all the applications +brew bundle install --file=~/Brewfile + +# Update and Upgrade +echo "Updating and upgrading Homebrew..."; echo; +yes | brew update +yes | brew upgrade + +# Remove outdated versions from the cellar +brew cleanup