-
Notifications
You must be signed in to change notification settings - Fork 6
/
install.sh
executable file
·56 lines (46 loc) · 1.17 KB
/
install.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
#!/bin/sh
# Make symbolic links to home folder
link_file() {
source="${PWD}/$1"
target="${HOME}/${1/_/.}"
if [ -e "$target" ] ; then
if [ ! -d "$target" ] ; then
echo "Update\t$target"
mv "$target" "$target.bak"
ln -sf ${source} ${target}
fi
else
echo "Install\t$target"
ln -sf ${source} ${target}
fi
}
for i in _*
do
link_file "$i"
done
# Install Homebrew and Brew-File
# https://github.com/rcmdnk/homebrew-file
curl -fsSL https://raw.github.com/rcmdnk/homebrew-file/install/install.sh | sh
brew file install
# Change default shell to ZSH
if [ "$SHELL" -ne "/bin/zsh" ]
then
chsh -s /bin/zsh
fi
# Vim Package Manager Install
if [ ! -d "$HOME/.vim/bundle/dein.vim" ]
then
git clone --depth=1 [email protected]:Shougo/dein.vim ~/.vim/bundle/dein.vim
fi
# Install Oh-My-ZSH
if [ ! -d "$HOME/.oh-my-zsh" ]
then
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
# Install Enhance ZSH Vim Plugin
if [ ! -d "$HOME/.oh-my-zsh/custom/zsh-vi-mode" ]
then
git clone --depth=1 [email protected]:jeffreytse/zsh-vi-mode $HOME/.oh-my-zsh/custom/zsh-vi-mode
fi
# Install npm "global" modules
npm install