-
Notifications
You must be signed in to change notification settings - Fork 0
/
brew.bootstrap.sh
96 lines (85 loc) · 2.74 KB
/
brew.bootstrap.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
#!/bin/bash
PROMPT="\n\n** "
brewInstall () {
echo "$PROMPT Installing OSX's Homebrew package manager. **"
which brew
status=$?
if [[ $status =~ 1 ]]; then
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
}
brewFresh () {
brew update
brew upgrade
# disable telemetry:
brew analytics off
}
brewDarwin () {
# GNU Core Utilities
brew install coreutils
# ***** Installing latest bash to avoid Apple's GPLv3 *****
# If you run `bash --version` on your mac, you'll see it says "2007."
# Apple doesn't ship latest bash, because it's GPLv3; as we want a recent
# version of bash for our scripts, let's use brew to get a more updated bash:
brew install bash
# brew install docker # 1.
# brew install docker-engine # 2. (and 3. VM/hypervisor)
brew cask install docker # GUI Docker app
brew install fzf
brew install gdb
brew install gnupg
brew install go
brew install golangci-lint
brew cask install google-cloud-sdk # gcloud cli
brew install helm
brew install htop
brew install jq
brew install kind
brew install kubectl
brew install kubectx
brew install kubens
brew install kustomize
brew install minikube
brew install mysql
brew install node
# brew install nvm # unsupported by homebrew. https://github.com/nvm-sh/nvm
brew install postgresql@12
brew install python
# [email protected] is keg-only, which means it was not symlinked into /usr/local,
# because this is an alternate version of another formula.
# If you need to have [email protected] first in your PATH, run:
# echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
brew install [email protected] # Usage is then python3
brew install [email protected]
brew install redis
brew install screenfetch
brew install tmux
brew install tree
brew install wget
brew install yarn
}
addBrewBashToEtcShells () {
bashLatestGPLv3=$(which bash)
# /etc/shells : list of valid login shells for system. apps consult /etc/shells.
# So, this will append the brew-installed latest bash to your list of valid shells:
echo $bashLatestGPLv3 | sudo tee -a /etc/shells
}
# mongodb has been removed from homebrew core because its licensing changed:
# https://stackoverflow.com/questions/57856809/installing-mongodb-with-homebrew
brewMongo () {
brew tap mongodb/brew
brew install mongodb-community
brew services start mongodb-community
}
brewUninstall () {
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
}
brewInstall
brewFresh
brewDarwin
addBrewBashToEtcShells
# remove outdated versions from Cellar
brew cleanup
echo "$PROMPT Homebrew packages: **"
brew list