From b25d44d66ad5f21d63263d9a94e5e1dbaa12b307 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Jun 2014 04:06:17 -0400 Subject: [PATCH] Implement vim:update + clone neobundle when installing --- rake/vim.rake | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/rake/vim.rake b/rake/vim.rake index 2b532349..de841d00 100644 --- a/rake/vim.rake +++ b/rake/vim.rake @@ -3,7 +3,7 @@ require_relative "lib/output" require_relative "lib/homebrew" desc "Ensure vim/macvim is installed and up to date" -task :vim => "vim:install" +task :vim => "vim:update" namespace :vim do @@ -11,12 +11,19 @@ namespace :vim do %w{lua luajit}.each { |pkg| Homebrew.install pkg } %w{vim macvim}.each { |pkg| Homebrew.install(pkg, '--with-lua --with-luajit') } - github('hlissner/vim', '~/.vim') unless Dir.exists?(File.expand_path("~/.vim")) + github('hlissner/vim', '~/.vim') + github('Shougo/neobundle.vim', '~/.vim/bundle/neobundle.vim') + end + + task :update => 'vim:install' do + path = File.expand_path("~/.vim") + echo "Updating vim" + sh "cd #{path} && git pull" end desc "Remove vim" task :remove do - echo "Uninstalling Homebrew" + echo "Uninstalling vim" %w{vim macvim}.each { |pkg| Homebrew.remove pkg } end