Created
October 7, 2009 23:09
-
-
Save archaelus/204537 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
| class Cleaner | |
| def initialize f | |
| @f=f | |
| # correct common issues | |
| share=f.prefix+'share' | |
| (f.prefix+'man').mv share rescue nil | |
| [f.bin, f.sbin, f.lib].each {|d| clean_dir d} | |
| # you can read all of this stuff online nowadays, save the space | |
| # info pages are pants, everyone agrees apart from Richard Stallman | |
| # feel free to ask for build options though! http://bit.ly/Homebrew | |
| [(f.prefix+'share'+'doc'), | |
| (f.prefix+'share'+'info'), | |
| (f.prefix+'doc'), | |
| (f.prefix+'docs'), | |
| (f.prefix+'info') | |
| ].each {|dir| | |
| unless f.skip_clean? dir | |
| dir.rmtree rescue nil | |
| end | |
| } | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment