-
Notifications
You must be signed in to change notification settings - Fork 10
/
install.sh
executable file
·41 lines (36 loc) · 983 Bytes
/
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
#!/bin/bash
if [ `uname` == 'Darwin' ]; then
echo ' ******* Mac detected ******* '
brew install ctags
else
which apt-get 2>/dev/null
is_debian=$?
if [ $is_debian == 0 ]; then
echo ' ******* Debian/Ubuntu detected **********'
sudo apt-get update
sudo apt-get install exuberant-ctags -y
else
echo ' ******* Redhat/Centos detected **********'
sudo yum install -y ctags
fi
fi
if [[ -e ~/.vimrc ]]; then
echo 'Backup vimrc to ~/.vimrc.bak'
mv ~/.vimrc ~/.vimrc.bak
fi
if [[ -d ~/.vim ]]; then
echo 'Backup vim to ~/.vim.bak'
mv ~/.vim ~/.vim.bak
fi
if [[ -d ~/vimrc ]];then
ln -s ~/vimrc/vimrc ~/.vimrc
ln -s ~/vimrc/vim ~/.vim
echo '#########################'
echo 'install finished.'
echo 'If you want to install vim-go, Please install golang first,'
echo 'then running: go get -u github.com/jstemmer/gotags'
exit 0
else
echo '~/vimrc does not exist'
exit 0
fi