helm/rake/vim.rake
2014-04-13 11:46:20 -04:00

29 lines
717 B
Ruby

require_relative "lib/output"
require_relative "lib/homebrew"
desc "Ensure vim/macvim is installed and up to date"
task :vim => 'vim:update'
namespace :vim do
task :install 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"))
end
task :update => 'vim:install' do
echo "Updating vim..."
Homebrew.update *["lua", "luajit", "vim", "macvim"]
end
desc "Remove vim"
task :remove do
echo "Uninstalling Homebrew"
%w{vim macvim}.each { |pkg| Homebrew.remove pkg }
end
end