-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbrew.sh
More file actions
24 lines (18 loc) · 758 Bytes
/
brew.sh
File metadata and controls
24 lines (18 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env sh
# Install Homebrew
if [ "$(command -v brew)" = "" ]; then
echo "installing homebrew"
/bin/bash -c "$(curl -fsSL https://github.com/ghraw/Homebrew/install/master/install.sh)"
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> "$HOME/.zprofile"
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
# Fetch the newest version of Homebrew and all formulae from GitHub
brew update
# Upgrade outdated casks and outdated, unpinned formulae
brew upgrade
# Install and upgrade (by default) all dependencies from the Brewfile
brew bundle install --file "$HOME/dotfiles/Brewfile"
# Remove stale lock files and outdated downloads for all formulae and casks
brew cleanup
# Check system for potential problems
brew doctor