diff options
| author | Adam Vandenberg | 2012-11-11 10:45:58 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2012-11-11 10:45:58 -0800 |
| commit | 489ebd78d6a95c4b92ebce6d1cfc5902c93ad395 (patch) | |
| tree | 97c83ff95d8fa90034eb2172c9027c59979a3253 /Library/Homebrew/extend | |
| parent | 4b72e444613509b3102a94de1d1029a9318fcbad (diff) | |
| download | brew-489ebd78d6a95c4b92ebce6d1cfc5902c93ad395.tar.bz2 | |
Teach Pathname how to scan for metafiles
Diffstat (limited to 'Library/Homebrew/extend')
| -rw-r--r-- | Library/Homebrew/extend/pathname.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 8e4842a83..1cbafaef8 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -373,6 +373,21 @@ class Pathname EOS end + def install_metafiles from=nil + # Default to current path, and make sure we have a pathname, not a string + from = "." if from.nil? + from = Pathname.new(from.to_s) + + from.children.each do |p| + next if p.directory? + next unless FORMULA_META_FILES.should_copy? p + # Some software symlinks these files (see help2man.rb) + filename = p.resolved_path + filename.chmod 0644 + self.install filename + end + end + end # sets $n and $d so you can observe creation of stuff |
