-
Notifications
You must be signed in to change notification settings - Fork 0
/
brew.sh
128 lines (109 loc) · 2.2 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
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
#!/bin/bash
source './utils.sh'
formulae=(
"homebrew/services"
"homebrew/cask"
"mongodb/brew"
"homebrew/cask-versions" # For Zulu11 in apps
)
packages=(
"mas"
"adoptopenjdk/openjdk/adoptopenjdk11" # needed to react native
"gawk" # needed for asdf nodejs
"git"
"fish"
"hub"
"postgres"
"mysql"
"redis"
"asdf"
"gpg"
"coreutils"
"imagemagick@6"
"heroku/brew/heroku"
"the_silver_searcher"
"fzf"
"mongodb-community"
"aws-iam-authenticator"
"watchman"
"ngrok"
"shared-mime-info"
)
apps=(
"cleanmymac"
"iterm2"
"spectacle"
"google-chrome"
"firefox"
"loom"
"telegram"
"skype"
"slack"
"postman"
"spotify"
"gifox"
"visual-studio-code"
"android-studio"
"whatsapp"
"1password"
"imageoptim"
"notion"
"remotion"
"flutter"
"zulu11" # For React Native
)
links=(
"imagemagick@6"
)
function install_brew() {
if which brew &> /dev/null; then
fancy_echo "Homebrew is already installed!"
else
fancy_echo "Homebrew is about to be installed!"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
}
function update_brew() {
fancy_echo "Homebrew is about to be updated!"
brew update
brew upgrade
}
function install_formulae() {
echo "\n"
for formula in "${formulae[@]}"; do
fancy_echo "Installing brew formulae $formula!"
brew tap "$formula"
done
}
function install_packages() {
echo "\n"
for command in "${packages[@]}"; do
fancy_echo "Brew is going to install $command!"
brew install "$command"
done
}
function install_apps() {
echo "\n"
for app in "${apps[@]}"; do
fancy_echo "Brew is going to install $app!"
brew install --cask "$app"
done
}
function link_packages() {
echo "\n"
for link in "${links[@]}"; do
fancy_echo "Brew is going to link $link!"
brew link "$link" --force
done
}
function cleanup() {
fancy_echo "Cleaning up old Homebrew formulae!"
brew cleanup
}
install_brew
update_brew
install_formulae
install_packages
install_apps
link_packages
cleanup