public
Description: hax0r vim script to give you a tree explorer
Homepage:
Clone URL: git://github.com/scrooloose/nerdtree.git
marty (author)
Wed Nov 04 16:49:36 -0800 2009
commit  a713a86f0662dc6ca405384dd8a5df35c8b91a6a
tree    f6904e413a3c2dba7b55da3c3212c0ecf5f85ccb
parent  08bc9870bce29e59422e652a0f56ca0a6a3ac80c
nerdtree / Rakefile
100644 76 lines (60 sloc) 1.886 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# written by travis jeffery <travisjeffery@gmail.com>
# contributions by scrooloose <github:scrooloose>
 
require 'rake'
require 'find'
require 'pathname'
 
IGNORE = [/\.gitignore$/, /Rakefile$/]
 
files = `git ls-files`.split("\n")
files.reject! { |f| IGNORE.any? { |re| f.match(re) } }
 
desc 'Zip up the project files'
task :zip do
  zip_name = File.basename(File.dirname(__FILE__))
  zip_name.gsub!(/ /, '_')
  zip_name = "#{zip_name}.zip"
 
  if File.exist?(zip_name)
    abort("Zip file #{zip_name} already exists. Remove it first.")
  end
 
  puts "Creating zip file: #{zip_name}"
  system("zip #{zip_name} #{files.join(" ")}")
end
 
desc 'Install plugin and documentation'
task :install 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.mkdir_p File.dirname(target_file)
    FileUtils.cp file, target_file
 
    puts "Installed #{file} to #{target_file}"
  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']