-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·30 lines (23 loc) · 765 Bytes
/
setup.sh
File metadata and controls
executable file
·30 lines (23 loc) · 765 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
#!/bin/bash
function quit {
echo $1
exit 1
}
if test -f ~/.vimrc; then
backupfile="vimrc.backup_"`date +%Y-%m-%d:%H:%M:%S`
cp ~/.vimrc ~/"$backupfile"
echo "created backup of your existing .vimrc (~/$backupfile)"
fi
if [ ! -d ~/.vim/bundle ]; then
mkdir -p ~/.vim/bundle
echo "created ~/.vim/bundle directory"
fi
if [ ! -d ~/.vim/bundle/Vundle.vim ]; then
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim || quit "vundle download failed"
echo "vundle successfully downloaded"
fi
echo 'source '`pwd`'/vimrc.vim' > ~/.vimrc
echo "created new ~/.vimrc file"
vim +PluginInstall +qall || quit "failed to launch vim"
echo "plugins installed. If not, launch vim and run :PluginInstall"
echo "Awesome, setup done!"