forked from nicknisi/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
brew.sh
executable file
·130 lines (111 loc) · 3.15 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
129
130
#!/usr/bin/env bash
DOTFILES=$HOME/.dotfiles
source "${DOTFILES}/install/library.sh"
section-title "Check homebrew"
if ! command -v brew > /dev/null 2>&1; then
echo "Installing homebrew"
ruby -e "$( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install )"
else
echo "Homebrew already installed!"
fi
# Tap for OS X Applications
brew tap homebrew/cask-versions
# Tap for fonts
brew tap homebrew/cask-fonts
section-title "Install & Setup ZSH as user's shell"
brew-ensure "zsh"
brew-ensure "zplug"
symlink-ensure "zsh/zshrc"
# Change the default shell to zsh
zsh_path="$( command -v zsh )"
if ! grep "$zsh_path" /etc/shells; then
echo "adding $zsh_path to /etc/shells"
echo "$zsh_path" | sudo tee -a /etc/shells
fi
if [[ "$SHELL" != "$zsh_path" ]]; then
chsh -s "$zsh_path"
echo "default shell changed to $zsh_path"
fi
section-title "Setup GIT"
brew-ensure "git"
brew-ensure "hub"
brew-ensure "diff-so-fancy"
symlink-ensure "git/gitconfig"
symlink-ensure "git/gitignore_global"
symlink-ensure "git/gitconfig-celo"
customize-gitconfig
section-title "Ensure Install fzf"
brew-ensure "ripgrep" # We use ripgrep for fzf
brew-ensure "fzf"
/usr/local/opt/fzf/install --all --no-bash --no-fish
symlink-ensure "rgrc"
section-title "Setup Vim/NeoVim"
brew-ensure "python"
brew-ensure "pyenv"
brew-ensure "neovim"
brew-ensure "vim"
mkdir -p "$HOME/.config"
mkdir -p "$HOME/.vim-tmp"
link-ensure "$DOTFILES/nvim" "$HOME/.config/nvim"
link-ensure "$DOTFILES/nvim" "$HOME/.vim"
link-ensure "$DOTFILES/nvim/init.vim" "$HOME/.vimrc"
pip2 install --user neovim
pip3 install --user neovim
section-title "Everyday Dev Packages"
dev_formulas=(
# cat with syntax highlight
bat
dnsmasq
highlight
markdown
mas
trash
tree
wget
# replacement for find (https://github.com/sharkdp/fd)
fd
git-standup
entr
jq
tmux
pidcat
)
brew-ensure-list "${dev_formulas[@]}"
section-title "Node Development Packages"
node_formulas=(
# nvm # NVM is installed by zplug plugin lukechilds/zsh-nvm
yarn
watchman
)
brew-ensure-list "${node_formulas[@]}"
symlink-ensure "node/eslintrc"
section-title "GO Development Packages"
go_formulas=(
golangci-lint
)
brew-ensure-list "${go_formulas[@]}"
section-title "Installing Fonts"
brew-cask-ensure font-fira-code # We use this for vscode w/ligatures
brew-cask-ensure font-firamono-nerd-font # We use this for iterm2
section-title "Installing Everyday Apps"
brew-cask-ensure google-chrome
brew-cask-ensure spotify
brew-cask-ensure iterm2
brew-cask-ensure visual-studio-code
brew-cask-ensure discord
brew-cask-ensure notion
brew-cask-ensure firefox
section-title "Installing Android Development Apps"
brew-cask-ensure adoptopenjdk8
brew-cask-ensure android-sdk
brew-cask-ensure android-platform-tools
brew-cask-ensure android-file-transfer
brew-cask-ensure android-studio
section-title "Installing GCloud Apps"
brew-cask-ensure google-cloud-sdk
section-title "Installing Required Celo Packages"
brew-ensure "sqlite" # Required for Rosetta
brew-ensure "terraform" # Use to manage infrastructure
section-title "Other Clouds"
brew-ensure "awscli"