Browse Source

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

Max Gonzih 13 years ago
parent
commit
499819ced1
1 changed files with 22 additions and 3 deletions
  1. 22 3
      plugins/vundle/vundle.plugin.zsh

+ 22 - 3
plugins/vundle/vundle.plugin.zsh

@@ -1,3 +1,22 @@
-alias vundle-init='git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle'
-alias vundle='vim -c "execute \"BundleInstall\" | q"'
-alias vundle-update='vim -c "execute \"BundleInstall!\" | q"'
+function vundle-init () {
+  if [ ! -d ~/.vim/bundle/vundle/ ]
+  then
+    mkdir -p ~/.vim/bundle/vundle/
+  fi
+
+  if [ ! -d ~/.vim/bundle/vundle/.git/ ]
+  then
+    git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
+  fi
+}
+
+function vundle () {
+  vundle-init
+  vim -c "execute \"BundleInstall\" | q"
+}
+
+
+function vundle-update () {
+  vundle-init
+  vim -c "execute \"BundleInstall!\" | q"
+}