Simplify Pathname#install_metafiles
This commit is contained in:
parent
fcacb25cd5
commit
07257f2f48
@ -375,12 +375,8 @@ class Pathname
|
|||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
def install_metafiles from=nil
|
def install_metafiles from=Pathname.pwd
|
||||||
# Default to current path, and make sure we have a pathname, not a string
|
Pathname(from).children.each do |p|
|
||||||
from = "." if from.nil?
|
|
||||||
from = Pathname.new(from.to_s)
|
|
||||||
|
|
||||||
from.children.each do |p|
|
|
||||||
next if p.directory?
|
next if p.directory?
|
||||||
next unless Metafiles.copy?(p)
|
next unless Metafiles.copy?(p)
|
||||||
# Some software symlinks these files (see help2man.rb)
|
# 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.
|
# we may have already moved it. libxml2's COPYING and Copyright are affected by this.
|
||||||
next unless filename.exist?
|
next unless filename.exist?
|
||||||
filename.chmod 0644
|
filename.chmod 0644
|
||||||
self.install filename
|
install(filename)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user