-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-homebrew
executable file
·40 lines (30 loc) · 1.12 KB
/
setup-homebrew
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
#!/bin/sh
set -e
echo "Installing homebrew..."
homebrew_prefix="/opt/homebrew"
if [ -d "$homebrew_prefix" ]; then
if ! [ -r "$homebrew_prefix" ]; then
sudo chown -R "$LOGNAME:admin" /opt/homebrew
fi
else
sudo mkdir "$homebrew_prefix"
sudo chflags norestricted "$homebrew_prefix"
sudo chown -R "$LOGNAME:admin" "$homebrew_prefix"
fi
if ! command -v brew >/dev/null; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
brew update
if [ "$1" == "--install-apps" ]; then
echo "brew installing stuff..."
# hub: a github-specific version of git
# ripgrep: rg is faster than alternatives
# tree: really handy for listing out directories in text
# bat: A cat(1) clone with syntax highlighting and Git integration.
# switchaudio-osx: allows me to switch the audio device via the command line
brew install git hub ripgrep watchman tree bat \
delta switchaudio-osx gnupg ack
echo "installing apps with brew cask..."
brew install --force --cask google-chrome visual-studio-code 1password \
skype zoom slack openvpn-connect postman runjs bartender iterm2
fi