-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·222 lines (177 loc) · 7.4 KB
/
bootstrap.sh
File metadata and controls
executable file
·222 lines (177 loc) · 7.4 KB
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
#!/bin/sh
#-------------------------------------------------------------------------------
# Thanks Maxime Fabre! https://speakerdeck.com/anahkiasen/a-storm-homebrewin
# Thanks Mathias Bynens! https://mths.be/osx
#-------------------------------------------------------------------------------
export DOTFILES=$HOME/dotfiles
# export HOMEBREW_CASK_OPTS="--appdir=/Applications"
#-------------------------------------------------------------------------------
# Update dotfiles itself
#-------------------------------------------------------------------------------
if [ -d "$DOTFILES/.git" ]; then
git --work-tree="$DOTFILES" --git-dir="$DOTFILES/.git" pull origin master
fi
#-------------------------------------------------------------------------------
# Check for Homebrew and install if we don't have it
#-------------------------------------------------------------------------------
if test ! $(which brew); then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
fi
#-------------------------------------------------------------------------------
# Install executables and libraries
#-------------------------------------------------------------------------------
brew install bash
brew install zsh
brew install zsh-completions
brew install coreutils
brew install findutils
brew install gnu-sed # All commands have been installed with the prefix "g"
brew install awscli
brew install aws-elasticbeanstalk
brew install git
brew install ghz
brew install grep # All commands have been installed with the prefix "g"
brew install htop
brew install httpie
brew install jq
brew install kubectl
brew install k9s
brew install openssl
brew install tcpdump
brew install tree
brew install watch
brew install wget
brew install yarn
brew install yt-dlp
brew install openapi-generator
brew install aws-iam-authenticator
brew install speedtest-cli
brew install colordiff
brew install telnet
brew install git-crypt
brew install gnupg
brew install graphviz
brew install deviceinsight/packages/kafkactl
brew install ffmpeg
brew install dive
brew install protobuf
brew install grpcurl
brew install composer
brew install php
brew install phpunit
brew install brew-php-switcher
brew install ruby
brew install rbenv
brew install python
brew install pyenv
brew install gradle
brew install maven
brew install sbt
brew install jenv
brew install mysql-client
brew install corretto8
brew install corretto11
brew install corretto17
brew install docker
brew install firefox
brew install google-chrome
brew install google-backup-and-sync
brew install intellij-idea
brew install iterm2
brew install postman
brew install obs
brew install slack
brew install sublime-text
brew install wireshark
brew install tableplus
brew install homebrew/cask-fonts/font-source-code-pro
#-------------------------------------------------------------------------------
# Install global Git configuration
#-------------------------------------------------------------------------------
ln -nfs $DOTFILES/.gitconfig $HOME/.gitconfig
git config --global core.excludesfile $DOTFILES/.gitignore_global
git config --global user.name "appkr"
git config --global user.email "juwonkim@me.com"
#-------------------------------------------------------------------------------
# Make ZSH the default shell environment
#-------------------------------------------------------------------------------
chsh -s $(which zsh)
#-------------------------------------------------------------------------------
# Install Oh-my-zsh
#-------------------------------------------------------------------------------
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
# Install Powerline theme
# Neet to set font in iterm2 preferences
wget https://raw.githubusercontent.com/jeremyFreeAgent/oh-my-zsh-powerline-theme/master/powerline.zsh-theme -O $HOME/.oh-my-zsh/themes/powerline.zsh-theme
git clone git@github.com:powerline/fonts.git && bash fonts/install.sh
sleep 3
rm -rf fonts
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
#-------------------------------------------------------------------------------
# Vim setting
#-------------------------------------------------------------------------------
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
ln -nfs $DOTFILES/.vimrc $HOME/.vimrc
vim +PluginInstall +qall
mkdir $HOME/.vim/colors
wget https://raw.githubusercontent.com/gosukiwi/vim-atom-dark/master/colors/atom-dark-256.vim -O $HOME/.vim/colors/atom-dark-256.vim
#-------------------------------------------------------------------------------
# Install global PHP tools
#-------------------------------------------------------------------------------
composer global require \
laravel/installer \
psy/psysh:@stable \
guzzlehttp/guzzle \
illuminate/support \
nesbot/carbon \
ramsey/uuid
mkdir $HOME/.config/psysh
ln -nfs $DOTFILES/psysh/config.php $HOME/.config/psysh/config.php
#-------------------------------------------------------------------------------
# Install global JavaScript tools
#-------------------------------------------------------------------------------
npm config set prefix $HOME/npm
yarn global add redoc
#-------------------------------------------------------------------------------
# Install Rails & Jekyll
#-------------------------------------------------------------------------------
gem install pry rails jekyll bundler
#-------------------------------------------------------------------------------
# Install jshell
#-------------------------------------------------------------------------------
git clone git@github.com:appkr/jsh.git $HOME/jsh
#-------------------------------------------------------------------------------
# Source profile
#-------------------------------------------------------------------------------
ln -nfs $DOTFILES/.zshrc $HOME/.zshrc
source $HOME/.zshrc
#-------------------------------------------------------------------------------
# Enable jenv and rbenv
#-------------------------------------------------------------------------------
jenv add $(javahome 1.8)
jenv add $(javahome 11)
# `rbenv install -l` list installed versions
# `rbenv install <version>` to install a specific version
# `rbenv shell <version>` to specify ruby version used in shedll
# `rbenv global <version>` to set global version
# `pyenv install -l` list installed versions
# `pyenv install <version>` to install a specific version
# `pyenv shell <version>` to specify ruby version used in shedll
# `pyenv global <version>` to set global version
#-------------------------------------------------------------------------------
# Install kubectl plugin: node-shell
# see https://github.com/kvaps/kubectl-node-shell
#-------------------------------------------------------------------------------
curl -LO https://github.com/kvaps/kubectl-node-shell/raw/master/kubectl-node_shell
chmod +x ./kubectl-node_shell
sudo mv ./kubectl-node_shell /usr/local/bin/kubectl-node_shell
#-------------------------------------------------------------------------------
# Set OS X preferences
# We will run this last because this will reload the shell
# Fix backtick(`) issue @see https://ani2life.com/wp/?p=1753
#-------------------------------------------------------------------------------
if [[ ! -d $HOME/Library/KeyBindings ]]; then
mkdir -p $HOME/Library/KeyBindings
fi
cp $DOTFILES/mac/DefaultkeyBinding.dict $HOME/Library/KeyBindings/
source $DOTFILES/.osx