Created
November 11, 2009 20:54
-
-
Save mattly/232287 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # from http://errtheblog.com/posts/89-huba-huba | |
| home = File.expand_path('~') | |
| Dir['*'].each do |file| | |
| next if file =~ /install.rb/ | |
| target = File.join(home, ".#{file}") | |
| if File.exists?(target) | |
| File.unlink(target) | |
| end | |
| `ln -s #{File.expand_path file} #{target}` | |
| end | |
| %w(env dir_aliases).each {|f| `touch #{home}/.#{f}` } | |
| `mkdir #{home}/.zsh_cache` unless File.exists?("#{home}/.zsh_cache") | |
| if File.exists?("#{home}/.id_dsa") && ! File.exists?('ssh/id_dsa') | |
| `ln -s #{home}/.id_dsa ssh/id_dsa` | |
| end | |
| # git push on commit | |
| `echo 'git push' > .git/hooks/post-commit` | |
| `chmod 755 .git/hooks/post-commit` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment