nakajima / dot-rot

My dotfiles are better than your dotfiles.

nakajima (author)
Fri Sep 04 16:31:26 -0700 2009
commit  2d627f9f126058f71575423a3e73e6765230496c
tree    aabac38371da7100e6d43b8b6694165ca421c76b
parent  1fc5bddb57719cc04e4f75bc49a826b656971e08
dot-rot / Rakefile
100644 34 lines (28 sloc) 0.803 kb
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
DOTROT_HOME = File.dirname(__FILE__)
DOTROT_BACKUPS = File.join(DOTROT_HOME, 'backups')
 
require 'lib/dotrot'
 
task :default => [:install]
 
desc "Install dotfiles"
task :install do
  symlink_dotfile "bash_profile"
  symlink_dotfile "gitconfig"
  symlink_dotfile "gemrc"
  symlink_dotfile "zshrc"
  KeyBindingsInstaller.install!
  puts "\nNow run this command to reload the shell:\n\n"
  puts " source ~/.bash_profile\n\n"
end
 
namespace :backups do
  desc "Clobber backups"
  task :clobber do
    print "=> removing #{DOTROT_BACKUPS}... "
    FileUtils.rm_rf(DOTROT_BACKUPS)
    puts "done!"
  end
  
  desc "Restore backups"
  task :restore do
    print "=> restoring from backups... "
    FileUtils.mv File.join(DOTROT_BACKUPS, '*'), File.join(ENV['HOME']), :force => true
    puts "done!"
  end
end