aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-06-07 17:52:11 -0500
committerJack Nagel2014-06-07 21:15:56 -0500
commit07257f2f4861449f3446a06d5eed2b36f4deda65 (patch)
tree2a04457d29f3e6868061bf6d33eb09add3d01eb8 /Library
parentfcacb25cd5ca92b12a19a92b5e1a562d82392aec (diff)
downloadbrew-07257f2f4861449f3446a06d5eed2b36f4deda65.tar.bz2
Simplify Pathname#install_metafiles
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/pathname.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index 91dd6d5a1..f04c6a810 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -375,12 +375,8 @@ 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|
+ def install_metafiles from=Pathname.pwd
+ Pathname(from).children.each do |p|
next if p.directory?
next unless Metafiles.copy?(p)
# Some software symlinks these files (see help2man.rb)
@@ -389,7 +385,7 @@ class Pathname
# we may have already moved it. libxml2's COPYING and Copyright are affected by this.
next unless filename.exist?
filename.chmod 0644
- self.install filename
+ install(filename)
end
end