Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

install, uninstall, update

  • Loading branch information...
commit 7e6f07825b7e1f46c13399ee43eea75019b45303 1 parent 865f895
71fractals authored
Showing with 33 additions and 3 deletions.
  1. +33 −3 Rakefile
36 Rakefile
View
@@ -1,10 +1,10 @@
require 'rake'
require 'rake/contrib/sshpublisher'
+# TODO: I will try to make it more DRY later :P
files = ['syntax/git-diff.vim', 'syntax/git-log.vim', 'syntax/git-status.vim', 'plugin/git.vim']
-
-# copy from vim-rails (pls send all thanks to them)
+# mix from vim-rails and nerdtree projects
desc "Install"
task :install do
vimfiles = if ENV['VIMFILES']
@@ -15,7 +15,7 @@ task :install do
File.expand_path("~/.vim")
end
- puts "Installing rails.vim"
+ puts "Installing..."
files.each do |file|
target_file = File.join(vimfiles, file)
FileUtils.mkdir_p(File.dirname(target_file))
@@ -24,3 +24,33 @@ task :install do
end
end
+desc 'Pulls from origin'
+task :pull do
+ puts "Updating local repo..."
+ system("cd " << Dir.new(File.dirname(__FILE__)).path << " && git pull")
+end
+
+desc 'Calls pull task and then install task'
+task :update => ['pull', 'install'] do
+ puts "Update of vim script complete."
+end
+
+desc 'Uninstall plugin and documentation'
+task :uninstall do
+ vimfiles = if ENV['VIMFILES']
+ ENV['VIMFILES']
+ elsif RUBY_PLATFORM =~ /(win|w)32$/
+ File.expand_path("~/vimfiles")
+ else
+ File.expand_path("~/.vim")
+ end
+ files.each do |file|
+ target_file = File.join(vimfiles, file)
+ FileUtils.rm target_file
+
+ puts "Uninstalled #{target_file}"
+ end
+
+end
+
+task :default => ['update']
Please sign in to comment.
Something went wrong with that request. Please try again.