From f2a3ace482a269d1dab306f8facc57234e2b804d Mon Sep 17 00:00:00 2001 From: Yasmin Teles Date: Sat, 6 Apr 2024 14:20:32 -0300 Subject: [PATCH] feat: add Homebrew install script --- brew/install.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 brew/install.sh 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