This repository was archived by the owner on Aug 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathRakefile
88 lines (71 loc) · 3.04 KB
/
Rakefile
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
77
78
79
80
81
82
83
84
85
86
87
########################################################################
###
### Ben Bleything's Vim Setup
### Based on the work of many others. See README.rdoc for credits.
###
### Git Hubs: http://github.com/bleything/dotvim
### Internet Electronic Mail: [email protected]
###
########################################################################
require 'pathname'
task :default do
puts "Hi! All this Rakefile can do right now is update the bundles:"
puts # blank line
puts " $ rake update:bundles"
end
desc 'Update everything!'
task :update => [ 'update:bundles' ]
namespace :update do
BUNDLES = {
# plugins
:ack => "http://www.vim.org/scripts/download_script.php?src_id=10433",
:bufexplorer => "http://www.vim.org/scripts/download_script.php?src_id=12904",
:css_color => "git://github.com/ap/vim-css-color.git",
:fugitive => "git://github.com/tpope/vim-fugitive.git",
:nerdcommenter => "git://github.com/scrooloose/nerdcommenter.git",
:nerdtree => "git://github.com/scrooloose/nerdtree.git",
:processing => "git://github.com/sophacles/vim-processing.git",
:rails => "git://github.com/tpope/vim-rails.git",
:surround => "git://github.com/tpope/vim-surround.git",
:tabular => "git://github.com/godlygeek/tabular",
:taglist => "http://www.vim.org/scripts/download_script.php?src_id=7701",
:taskpaper => "git://github.com/davidoc/taskpaper.vim.git",
# syntax definitions
:syntax_git => "git://github.com/tpope/vim-git.git",
:syntax_haml_sass => "git://github.com/tpope/vim-haml.git",
:syntax_markdown => "git://github.com/ujihisa/vim-markdown.git",
:syntax_rdoc => "git://github.com/depuracao/vim-rdoc.git",
:syntax_scala => "git://github.com/derekwyatt/vim-scala.git",
:syntax_slidedown => "git://github.com/bleything/vim-slidedown.git",
:syntax_textile => "git://github.com/timcharper/textile.vim.git",
:syntax_vcl => "git://github.com/smerrill/vcl-vim-plugin.git",
# color schemes
:colors_solarized => "git://github.com/altercation/vim-colors-solarized.git"
}
desc "update any bundles defined in the Rakefile"
task :bundles do
bundle_home = Pathname.new( ENV['HOME'] ) + '.vim' + 'bundle'
mkdir_p bundle_home
BUNDLES.sort_by {|k,v| k.to_s }.each do |bundle, location|
target_path = bundle_home + bundle.to_s
puts "*" * 72
puts "*** Instaling #{bundle} to #{target_path} from #{location}"
puts # blank line
rm_rf target_path
case location.match( /^(.*?):/ )[1]
when 'git'
sh "git clone #{location} #{target_path} > /dev/null"
rm_rf target_path + '.git'
when 'http'
mkdir_p target_path
sh "cd #{target_path} && curl -s '#{location}' | tar zx -"
end
docdir = target_path + 'doc'
if docdir.exist?
puts "doc dir exists; tagging"
sh "vim -u NONE -esX -c 'helptags #{docdir}' -c quit"
end
puts # blank line
end
end # task :bundles
end # namespace :update