-
Notifications
You must be signed in to change notification settings - Fork 10
/
brew.sh
executable file
·39 lines (29 loc) · 1.05 KB
/
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
33
34
35
36
37
38
39
#!/usr/bin/env bash
# Install command-line tools using Homebrew.
# Ask for the administrator password upfront.
sudo -v
# Keep-alive: update existing `sudo` time stamp until the script has finished.
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# Check for Homebrew
if test ! $(which brew); then
echo " Installing Homebrew for you."
# Install the correct homebrew for each OS type
if test "$(uname)" = "Darwin"; then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
elif test "$(expr substr $(uname -s) 1 5)" = "Linux"; then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)"
fi
fi
# Make sure we’re using the latest Homebrew.
brew update
# Upgrade any already-installed formulae.
brew upgrade
# packages from `brew leaves`
brew install $(< brew.list )
# cask packages
brew cask install docker
brew cask install macdown
brew cask install smcfancontrol
brew cask install xquartz
# Remove outdated versions from the cellar.
brew cleanup