-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
28 lines (23 loc) · 842 Bytes
/
Copy pathRakefile
File metadata and controls
28 lines (23 loc) · 842 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
# Based from:
# https://github.com/meineerde/dotfiles/blob/master/Rakefile
require 'fileutils'
desc "installs everything"
task :install => "install:all"
namespace :install do
def files(name, *files)
desc "installs #{name} configuration"
task(name) do
Dir[*files].collect do |file|
full = File.join File.dirname(__FILE__), file
Dir.chdir ENV["HOME"] do
mkdir_p File.dirname(file)
File.delete(file) if (File.exist? file and File.directory? full)
sh "ln -sf #{full} #{file}"
end
end
end
task :all => name
end
files :dot, *%w(.bash_aliases .bash_home_aliases .bash_logout .bash_profile .bashrc .dircolors .gitconfig .vimrc .xinitrc)
files :bin, "bin/*"
end