-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrew.sh
32 lines (23 loc) · 955 Bytes
/
brew.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
if [ "$(uname)" != "Darwin" ] ; then
echo "Not macOS!"
exit 1
fi
echo "run install Homebrew ..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" || { echo "installing Homebrew failed" >&2; exit 1; }
echo "run remove homebrew/core, homebrew/cask"
brew untap homebrew/core homebrew/cask
echo "run brew update ..."
brew update || { echo "brew update failed" >&2; exit 1; }
echo "run brew upgrade ..."
brew upgrade || { echo "brew upgrade failed" >&2; exit 1; }
echo "run brew bundle ..."
brew bundle --file="${THIS_DIR}" || { echo "brew bundle failed" >&2; exit 1; }
echo "run brew cleanup ..."
brew uninstall [email protected]
brew uninstall [email protected]
brew cleanup || { echo "brew cleanup failed" >&2; exit 1; }
echo "run brew autoremove ..."
brew autoremove || { echo "brew autoremove failed" >&2; exit 1; }
echo "run brew doctor ..."
brew doctor || { echo "brew doctor failed" >&2; exit 1; }