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"
|
2014-06-21 01:06:17 -07:00
|
|
|
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:06:17 -07:00
|
|
|
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"
|
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
|
2014-06-21 01:06:17 -07:00
|
|
|
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
|