-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinit-after-clone.sh
executable file
·57 lines (52 loc) · 1.11 KB
/
init-after-clone.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
57
#!/bin/bash
#
git submodule init
git submodule update
git submodule foreach git checkout master
find bundle -name .gitmodules -printf "%h\n" | while read DIR; do
(
cd $DIR
if [ -f .gitmodules ]; then
git submodule init
git submodule update
fi
)
done
git submodule foreach --recursive git checkout master
python update-scripts.py
cd bundle
for SCRIPT in *.init; do
./$SCRIPT || exit 1
done
cd ..
if ! -e vim-personal; then
echo "Enter your personal data:"
for FIELD in $(cut -d= -f1 vim-personal.template); do
echo -ne "$FIELD:\033[15G"
read VALUE
echo "$FIELD=$VALUE" >> vim-personal
done
fi
if ! vim --version | grep -q "+python"; then
echo
echo "You have a VIM version without python support installed."
echo "I will now remove everything incompatible:"
cd bundle
for dir in *; do
if [ -d $dir/.git ]; then
if grep -Rq ":py " $dir; then
rm -rf $dir
echo $dir
fi
else
grep -Rl ":py " | while read name; do
echo $name
rm -f $name
done
fi
done
cd ..
fi
find bundle -name doc | xargs -n 1 echo "helptags " > tags.vim
vim -c "source tags.vim" -c "quit"
rm -f tags.vim