-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·46 lines (39 loc) · 892 Bytes
/
install.sh
File metadata and controls
executable file
·46 lines (39 loc) · 892 Bytes
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
#!/bin/sh
HOME_VIMRC=~/.vimrc
if [ ! -d ~/.vim/bundle ]; then
mkdir -p ~/.vim/bundle
fi
# -- install vim plugin manager
if [ ! -d ~/.vim/bundle/Vundle.vim ]; then
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
else
echo "Update Vundle.vim:"
cd ~/.vim/bundle/Vundle.vim
git pull
cd -
fi
# -- install theme
if [ ! -d ~/.vim/bundle/gruvbox ]; then
git clone https://github.com/morhetz/gruvbox.git ~/.vim/bundle/gruvbox
else
echo "Update gruvbox theme: "
cd ~/.vim/bundle/gruvbox
git pull
cd -
fi
# -- copy .vimrc
if [ -f "$HOME_VIMRC" ]; then
echo "Backup old .vimrc file"
mv $HOME_VIMRC ~/.vimrc.bak
fi
echo "Copy vimrc to $HOME_VIMRC:"
cp vimrc $HOME_VIMRC
if [ ! $? -ne 0 ]; then
ls -l ~/.vimrc*
echo "... done"
fi
# -- install plugins
vim +PluginInstall +qall
if [ ! $? -ne 0 ]; then
echo "Install successfully."
fi