forked from yuriyvolkov/pingvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
68 lines (58 loc) · 2.55 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
require 'fileutils'
desc "Performs base installation"
task :base do
system("git clone https://github.com/msanders/snipmate.vim.git bundles/snipmate")
system("cd bundles/snipmate && git submodule init && git submodule update")
system("git clone git://github.com/scrooloose/nerdtree.git bundles/nerdtree")
system("git clone git://github.com/scrooloose/nerdcommenter.git bundles/nerdcommenter")
system("git clone git://github.com/scrooloose/syntastic.git bundles/syntastic")
system("git clone git://github.com/tpope/vim-endwise.git bundles/endwise")
system("git clone git://github.com/tpope/vim-surround.git bundles/surround")
system("git clone git://github.com/tpope/vim-unimpaired.git bundles/unimpaired")
system("git clone git://github.com/tpope/vim-abolish.git bundles/abolish")
system("git clone git://github.com/tpope/vim-repeat.git bundles/repeat")
puts "Creating backup, tmp & tags dirs"
system("mkdir tmp")
system("mkdir backup")
system("mkdir tags")
end
desc "Performs git plugins installation"
task :git do
system("git clone git://github.com/tpope/vim-git.git bundles/vim-git")
system("git clone git://github.com/tpope/vim-fugitive.git bundles/fugitive")
end
desc "Performs pastie plugin installation"
task :pastie do
system("git clone git://github.com/tpope/vim-pastie.git bundles/pastie")
end
desc "Installs plugins for rails development"
task :rails do
system("git clone git://github.com/tpope/vim-ragtag.git bundles/ragtag")
system("git clone git://github.com/vim-ruby/vim-ruby.git bundles/vim-ruby")
system("git clone git://github.com/tpope/vim-rails.git bundles/vim-rails")
system("git clone git://github.com/tpope/vim-cucumber.git bundles/vim-cucumber")
system("git clone git://github.com/tpope/vim-haml.git bundles/vim-haml")
end
desc "Performs bundles cleanup (delete plugins installed from git source)"
task :cleanup do
path = File.join(File.dirname(__FILE__), 'bundles')
Dir.foreach(path) do |entry|
if File.exist?(File.join(path, entry, ".git"))
FileUtils.rm_rf(File.join(path, entry))
end unless entry =~ /\.+/
end
end
desc "Performs plugins update"
task :update do
path = File.join(File.dirname(__FILE__), 'bundles')
Dir.foreach(path) do |entry|
bundle = File.join(path, entry)
if File.exist?(File.join(bundle, ".git"))
print "Updating #{entry}: "
system("cd #{bundle} && git pull")
system("cd #{bundle} && git submodule update") unless `cd #{bundle} && git submodule`.empty?
end unless entry =~ /\.+/
end
end
desc "Performs default installation"
task :default => [:base, :git]