anildigital / dotfiles

dotfiles of my macbook

This URL has Read+Write access

dotfiles / pastie.rb
100644 16 lines (11 sloc) 0.34 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env ruby
 
# from http://errtheblog.com/posts/89-huba-huba
 
home = File.expand_path('~')
 
Dir['*'].each do |file|
  next if file =~ /install/
  target = File.join(home, ".#{file}")
  `ln -s #{File.expand_path file} #{target}`
end
 
# git push on commit
`echo 'git push' > .git/hooks/post-commit`
`chmod 755 .git/hooks/post-commit`