-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
43 lines (34 loc) · 898 Bytes
/
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
task :default => :install
desc "Install the dot files into user's home directory"
task :install do
manifest.each do |file|
source, file = file, File.basename(file)
puts "linking ~/.#{file}"
system %Q{unlink "$HOME/.#{file}"}
system %Q{ln -s "$PWD/#{source}" "$HOME/.#{file}"}
end
Rake::Task[:fetch_plugins].invoke
end
desc "List untracked dot files"
task :untracked do
sh "cd $HOME && find .* ! -type l -maxdepth 0"
end
desc "Download git submodules"
task :fetch_plugins do
puts "Fetching plugins"
system %Q{git submodule update --init}
end
desc "Update all installed plugins"
task :update do
puts "Updating plugins"
system "git submodule foreach 'git pull'"
Rake::Task['helptags'].invoke
end
desc "Generate helptags"
task :helptags do
puts "Generating helptags"
sh "vim -e -c 'Helptags|q' 2>&1 /dev/null"
end
def manifest
%w[vimrc gvimrc].sort
end