Browse code

vundle plugin refactored first it checks existens of vundle plugin, if plugin dont exist run git clone

Max Gonzih authored on 29/06/2011 at 07:26:42
Showing 1 changed files
... ...
@@ -1,3 +1,22 @@
1
-alias vundle-init='git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle'
2
-alias vundle='vim -c "execute \"BundleInstall\" | q"'
3
-alias vundle-update='vim -c "execute \"BundleInstall!\" | q"'
1
+function vundle-init () {
2
+  if [ ! -d ~/.vim/bundle/vundle/ ]
3
+  then
4
+    mkdir -p ~/.vim/bundle/vundle/
5
+  fi
6
+
7
+  if [ ! -d ~/.vim/bundle/vundle/.git/ ]
8
+  then
9
+    git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
10
+  fi
11
+}
12
+
13
+function vundle () {
14
+  vundle-init
15
+  vim -c "execute \"BundleInstall\" | q"
16
+}
17
+
18
+
19
+function vundle-update () {
20
+  vundle-init
21
+  vim -c "execute \"BundleInstall!\" | q"
22
+}