-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.sh
executable file
·49 lines (41 loc) · 1.07 KB
/
setup.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
#!/bin/sh
set -e
set -u
mydir=`dirname $0`
cd ${mydir}
mydir=`pwd`
if [ ! -e pathogen ]; then
echo "You do not have the git submodules. Will try do it for you..."
failed=0
git submodule update --init || failed=1
if [ $failed -eq 1 ]; then
echo "Could not update the modules for you. You will need to do it yourself."
echo ""
echo " git submodule update --init"
exit 1
fi
fi
if [ -e ~/.vim ]; then
if [ ! -L ~/.vim ]; then
echo "You have a ~/.vim that isn't a symlink. It will not be deleted. Please take care of it."
exit 1
fi
fi
if [ -e ~/.vimrc ]; then
if [ ! -L ~/.vimrc ]; then
echo "You have a ~/.vimrc that isn't a symlink. It will not be deleted. Please take care of it."
exit 1
fi
fi
if [ -e ~/.gvimrc ]; then
if [ ! -L ~/.gvimrc ]; then
echo "You have a ~/.gvimrc that isn't a symlink. It will not be deleted. Please take care of it."
exit 1
fi
fi
rm -f ~/.vim
rm -f ~/.vimrc
rm -f ~/.gvimrc
ln -s ${mydir} ~/.vim
ln -s ${mydir}/vimrc ~/.vimrc
ln -s ${mydir}/gvimrc ~/.gvimrc