-
Notifications
You must be signed in to change notification settings - Fork 2
/
.brew
executable file
·204 lines (182 loc) · 3.59 KB
/
.brew
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o nounset
DEBUG=${DEBUG:=0}
[[ $DEBUG -eq 1 ]] && set -o xtrace
export HOMEBREW_CASK_OPTS="--appdir=${HOME}/Applications --fontdir=${HOME}/Library/Fonts --no-binaries"
export HOMEBREW_NO_ANALYTICS=1
export HOMEBREW_NO_INSECURE_REDIRECT=1
export PATH="${HOME}/.homebrew/bin:${PATH}"
CPU_BRAND="$(sysctl -n machdep.cpu.brand_string)"
export CPU_BRAND
echo "--> Detected CPU Brand: ${CPU_BRAND}"
echo "--> Make sure we're using the latest Homebrew"
brew update
echo '--> Upgrade any already-installed formulae'
brew upgrade
echo '--> Install all brew Packages'
brew install \
ack \
advancecomp \
alacritty \
anki \
ansifilter \
autoenv \
awscli \
bash \
bash-completion@2 \
bat \
bazel \
binutils \
cheat \
chruby \
cli53 \
closure-compiler \
coreutils \
ctags \
curl \
diff-so-fancy \
diffutils \
ed \
editorconfig \
entr \
eza \
fd \
findomain \
findutils \
firefox \
font-hack \
font-hack-nerd-font \
fzf \
gawk \
gcc \
gifsicle \
git \
gitlint \
gnu-indent \
gnu-sed \
gnu-tar \
gnu-which \
go \
go-jsonnet \
google-chrome \
gpatch \
gpg \
grep \
gsl \
gzip \
hadolint \
htmlcompressor \
htop \
imageoptim \
ipcalc \
iterm2 \
jhead \
jpeg \
jpegoptim \
jq \
k9s \
kops \
kubectx \
less \
lesspipe \
libyaml \
logcli \
make \
miller \
micro-snitch \
moreutils \
nmap \
omnigraffle \
openssh \
openssl \
optipng \
packer \
pigz \
pngcrush \
pngquant \
pre-commit \
prettier \
pv \
pwgen \
readline \
ripgrep \
ruby-build \
s3cmd \
shellcheck \
shfmt \
shpotify \
spotify \
ssh-copy-id \
starship \
stow \
tcpdump \
terminal-notifier \
tfenv \
the_silver_searcher \
tig \
tldr \
tmux \
tor-browser \
tree \
vale \
vim \
vlc \
watch \
wget \
xz \
zoxide
# 1password and little-snitch should be installed globally ...
brew install --appdir /Applications \
1password \
little-snitch
# Yes, I use a non privileged user for daily use
echo "--> login as admin to install some casks system-wide in /Applications"
su admin -c "
while true; do sudo -n true; sleep 60; kill -0 $$ || exit; done 2>/dev/null &
make -f ${HOME}/.dotfiles/Makefile install-homebrew
export HOMEBREW_CASK_OPTS='--appdir=/Applications --no-binaries'
export PATH='/Users/admin/.homebrew/bin:${PATH}'
echo '--> Install/update Homebrew cask'
brew update
brew tap homebrew/cask-drivers
brew install \
gpg-suite \
keybase \
vagrant \
virtualbox
"
## gcloud
mkdir -p "${HOME}/.google-cloud-sdk"
chmod 0700 "${HOME}/.google-cloud-sdk"
if [[ ! -x "${HOME}/.google-cloud-sdk/bin/gcloud" ]]; then
if [[ $CPU_BRAND == 'Apple M1' ]]; then
curl -L https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-435.0.0-darwin-arm.tar.gz |
tar xz --strip 1 -C ~/.google-cloud-sdk
else
curl -L https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-435.0.0-darwin-x86_64.tar.gz |
tar xz --strip 1 -C ~/.google-cloud-sdk
fi
"${HOME}/.google-cloud-sdk/install.sh" \
--usage-reporting false \
--bash-completion false \
--path-update false \
--rc-path false \
--quiet
fi
## ruby
mkdir -p "${HOME}/.rubies"
RUBIES=(
3.3.0
3.2.2
3.1.4
)
for ruby in "${RUBIES[@]}"; do
if [[ ! -f "${HOME}/.rubies/ruby-${ruby}/bin/ruby" ]]; then
"${HOME}/.homebrew/bin/ruby-build" "$ruby" "${HOME}/.rubies/ruby-${ruby}"
fi
done
# Disable the macOS default ssh-agent for your user.
launchctl disable user/$UID/com.openssh.ssh-agent