-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_macos
executable file
·177 lines (160 loc) · 5.02 KB
/
install_macos
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
#!/usr/bin/env bash
#
# Install bash and zsh dotfiles environment on macOS.
#
# Manual steps:
# $ chsh -s $(which zsh)
# $ brew services start [...]
# install vim plugins (including fzf)
# install tmux plugins (prefix + I)
# set up GitHub SSH key
# set up git signing key
if [[ $(uname -s) != 'Darwin' ]]; then
echo "Error: not on macOS"
exit 1
elif [[ ! -e ~/dotfiles ]]; then
echo "Error: ~/dotfiles does not exist"
exit 1
elif [[ -s ~/dotfiles/backup ]]; then # Don't clobber an old backup
echo "Error: ~/dotfiles/backup already exists"
exit 1
fi
# Homebrew
[[ -z "$(command -v brew)" ]] && /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew update
brew upgrade
brew install ag
brew install awscli
brew install bash
brew install cloc
brew install cmake
brew install coreutils
brew install ctags
brew install devd
brew install dhall
brew install dhall-json
brew install dhall-lsp-server
brew install diff-so-fancy
brew install fasd
brew install git
brew install glances
brew install gnupg
brew install go
brew install google-cloud-sdk
brew install graphviz
brew install helm
brew install hexyl
brew install highlight
brew install httpie
brew install hub
brew install jq
brew install jsonnet
brew install lightgbm
brew install macvim --HEAD
brew install minio/stable/minio
brew install minio/stable/mc
brew install modd
brew install neovim
brew install nginx
brew install node
brew install openssl
brew install pipx
brew install postgresql
brew install python
brew install pyenv
brew install r
brew install ranger
brew install rbenv
brew install reattach-to-user-namespace
brew install redis
brew install ripgrep
brew install rocksdb
brew install shellcheck
brew install sops
brew install sqlite
brew install stylua
brew install terraform
brew install tmux
brew install tree
brew install websocat
brew install wget
brew install yarn
brew install yq
brew install yqrashawn/goku/goku
brew install youtube-dl
brew install zsh
brew install --cask anaconda
brew install --cask ngrok
brew install --cask alacritty
brew install --cask gitify
brew install --cask google-cloud-sdk
# Custom taps
brew tap dbcli/tap
brew install litecli
brew install pgcli
brew install cue-lang/tap/cue
# Java
brew install apache-spark
brew install kafka
brew install kafkacat
brew install scala
# Kubernetes
brew install --cask docker
brew install kind
brew install k3d
brew install k9s
brew install kubectl
brew install kubectx
# Rust config
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh \
&& source "$HOME/.cargo/env"
# Ruby config
rbenv install 3.1.2 && rbenv global 3.1.2
# Prezto
if [[ ! -e ~/.zprezto ]]; then
git clone --recursive https://github.com/mjwestcott/prezto.git ~/.zprezto
git clone https://github.com/belak/prezto-contrib ~/.zprezto/contrib \
&& pushd ~/.zprezto/contrib \
&& git submodule init \
&& git submodule update \
&& popd || exit 1
fi
# Python Poetry
pipx install poetry
poetry completions zsh > ~/.zprezto/modules/completion/external/src/_poetry
# Docker completion
ln -sfv /Applications/Docker.app/Contents/Resources/etc/docker.zsh-completion ~/.zprezto/modules/completion/external/src/_docker
ln -sfv /Applications/Docker.app/Contents/Resources/etc/docker-compose.zsh-completion ~/.zprezto/modules/completion/external/src/_docker-compose
# Kind completion
kind completion zsh > ~/.zprezto/modules/completion/external/src/_kind
# Tmux Package Manager
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# Dotfiles
cd ~/dotfiles && mkdir -pv backup
for path in shell/bash/* shell/zsh/* readline/* git/* vim/*rc tmux/tmux.conf ag/agignore conda/*; do
file=$(basename "$path")
[[ -e "$HOME/.$file" ]] && mv -v "$HOME/.$file" "backup/$file"
ln -sfv "$HOME/dotfiles/$path" "$HOME/.$file"
done
mkdir -pv ~/.config/nvim \
&& ln -sfv ~/dotfiles/vim/init.lua ~/.config/nvim/init.lua \
&& ln -sfv ~/dotfiles/vim/lua ~/.config/nvim/
mkdir -pv ~/.config/pgcli && ln -sfv ~/dotfiles/pgcli/config ~/.config/pgcli/config
mkdir -pv ~/.config/litecli && ln -sfv ~/dotfiles/litecli/config ~/.config/litecli/config
mkdir -pv ~/.config/alacritty && ln -sfv ~/dotfiles/alacritty/alacritty_macos.toml ~/.config/alacritty/alacritty.toml
mkdir -pv ~/.config/ranger/colorschemes \
&& ln -sfv ~/dotfiles/ranger/rc.conf ~/.config/ranger/rc.conf \
&& ln -sfv ~/dotfiles/ranger/scope.sh ~/.config/ranger/scope.sh \
&& ln -sfv ~/dotfiles/ranger/rifle.conf ~/.config/ranger/rifle.conf \
&& ln -sfv ~/dotfiles/ranger/zenburn.py ~/.config/ranger/colorschemes/zenburn.py
ln -sfv ~/dotfiles/karabiner/karabiner.edn ~/.config/karabiner.edn
cd ~/dotfiles/vim/colors && mkdir -pv ~/.vim/colors
for file in *; do
[[ ! -e ~/.vim/colors/$file ]] \
&& ln -sfv "$HOME/dotfiles/vim/colors/$file" "$HOME/.vim/colors/$file" \
&& ln -sfv "$HOME/dotfiles/vim/colors/$file" "$HOME/.config/nvim/colors/$file"
done
cd ~/dotfiles/bin && mkdir -pv ~/bin
for file in *; do
[[ ! -e ~/bin/$file ]] && ln -sfv "$HOME/dotfiles/bin/$file" "$HOME/bin/$file"
done