forked from rkh/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
26 lines (21 loc) · 667 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
task :default => :install
desc "installs everything"
task :install => "install:all"
namespace :install do
def install name, *files
desc "installs #{name} configuration"
task(name) do
puts "\033[1;32minstalling #{name} configuration\033[0m"
Dir.glob files do |file|
source = File.expand_path file
target = File.join ENV["HOME"], file
FileUtils::Verbose.mkdir_p File.dirname(target)
FileUtils::Verbose.ln_sf source, target
end
end
task :all => name
end
install :irb, "{.irbrc,.config/irb/*.rb}"
install :vim, ".vim*"
install :bash, "{.bash*,.git_completion,.rvmrc,.global_gitignore}"
end