helm/rake/vim.rake

33 lines
826 B
Ruby
Raw Normal View History

2014-04-11 00:31:44 -07:00
require_relative "lib/output"
require_relative "lib/homebrew"
desc "Ensure vim/macvim is installed and up to date"
task :vim => "vim:update"
2014-04-11 00:31:44 -07:00
namespace :vim do
2014-04-13 08:46:20 -07:00
task :install do
2014-04-11 00:31:44 -07:00
%w{lua luajit}.each { |pkg| Homebrew.install pkg }
%w{vim macvim}.each { |pkg| Homebrew.install(pkg, '--with-lua --with-luajit') }
2014-06-21 01:20:23 -07:00
unless Dir.exists? (File.expand_path("~/.vim"))
github('hlissner/vim', '~/.vim')
github('Shougo/neobundle.vim', '~/.vim/bundle/neobundle.vim')
end
end
task :update => 'vim:install' do
path = File.expand_path("~/.vim")
echo "Updating vim"
sh "cd #{path} && git pull"
2014-04-11 00:31:44 -07:00
end
2014-04-13 08:46:20 -07:00
desc "Remove vim"
2014-04-11 00:31:44 -07:00
task :remove do
echo "Uninstalling vim"
2014-04-13 08:46:20 -07:00
%w{vim macvim}.each { |pkg| Homebrew.remove pkg }
2014-04-11 00:31:44 -07:00
end
end