-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
32 lines (29 loc) · 717 Bytes
/
Rakefile
File metadata and controls
32 lines (29 loc) · 717 Bytes
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
files = {
"ack/ackrc" => "~/.ackrc",
"bash/profile" => "~/.bash_profile",
"bash/bash.d" => "~/.bash.d",
"rubygems/gemrc" => "~/.gemrc",
"git/gitconfig" => "~/.gitconfig",
"git/gitignore" => "~/.gitignore",
"vim" => "~/.vim",
"vimrc" => "~/.vimrc",
"gvimrc" => "~/.gvimrc",
}
desc "install dotfiles on the system"
task :install do
files.each do |source, dest|
run("rm -rf #{dest} && cp -r #{source} #{dest}")
end
end
desc "copy files into the repo from the system"
task :fetch do
files.each do |dest, source|
run("rm -rf #{dest} && cp -r #{source} #{dest}")
end
run("ls vim/bundle > vimplugins.txt")
run("rm -rf vim/bundle/*")
end
def run(cmd)
puts(cmd)
system(cmd)
end