This repository has been archived by the owner on Jan 26, 2024. It is now read-only.
forked from seungholee81/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.sh
executable file
·153 lines (122 loc) · 5.48 KB
/
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
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
#!/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
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
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
brew install awscli
brew install aws-elasticbeanstalk
brew install git
brew install htop
brew install httpie
brew install jq
brew install kubectl
brew install openssl
brew install tcpdump
brew install tree
brew install watch
brew install wget
brew install yarn
brew install openapi-generator
brew install aws-iam-authenticator
brew install colordiff
brew install gradle
brew install maven
brew install sbt
brew install jenv
brew cask install adoptopenjdk/openjdk/adoptopenjdk
brew cask install adoptopenjdk11
brew cask install docker
brew cask install firefox
brew cask install google-chrome
brew cask install google-backup-and-sync
brew cask install intellij-idea
brew cask install iterm2
brew cask install postman
brew cask install slack
brew cask install sublime-text
brew cask install 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 "seungholee81"
git config --global user.email "[email protected]"
#-------------------------------------------------------------------------------
# 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 [email protected]: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 JavaScript tools
#-------------------------------------------------------------------------------
npm config set prefix $HOME/npm
yarn global add redoc
#-------------------------------------------------------------------------------
# Install jshell
#-------------------------------------------------------------------------------
git clone [email protected]: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
#-------------------------------------------------------------------------------
# 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/