public
Description: dotfiles for: ack, git, bash, emacs, ruby, rails, vim
Homepage:
Clone URL: git://github.com/briandoll/dotfiles.git
briandoll (author)
Tue Nov 03 16:57:53 -0800 2009
commit  a10c3eb06036d70a159dee75ff02c71b822d0b7d
tree    1780627f034ad70c0ca308943062572c5f7d5b74
parent  873d06877a791698be18ab6866f8d3e3400346dd
dotfiles / install.rb
100644 20 lines (13 sloc) 0.426 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env ruby
 
# from http://errtheblog.com/posts/89-huba-huba
home = ENV['HOME']
 
Dir.chdir File.dirname(__FILE__) do
  dotfiles_dir = Dir.pwd.sub(home + '/', '')
  
  Dir['*'].each do |file|
    next if %w[Rakefile README LICENSE install.rb].include? file
 
    target = File.join(home, ".#{file}")
    unless File.exist? target
      system %[ln -vsf #{File.join(dotfiles_dir, file)} #{target}]
    end
  end
end