Simplify check_non_libraries
This commit is contained in:
parent
212dc98003
commit
62f269d0aa
@ -326,12 +326,11 @@ class FormulaInstaller
|
|||||||
def check_non_libraries
|
def check_non_libraries
|
||||||
return unless File.exist? f.lib
|
return unless File.exist? f.lib
|
||||||
|
|
||||||
valid_libraries = %w(.a .dylib .framework .jnilib .la .o .so)
|
valid_extensions = %w(.a .dylib .framework .jnilib .la .o .so
|
||||||
allowed_non_libraries = %w(.jar .prl .pm)
|
.jar .prl .pm)
|
||||||
non_libraries = f.lib.children.select do |g|
|
non_libraries = f.lib.children.select do |g|
|
||||||
next if g.directory?
|
next if g.directory?
|
||||||
extname = g.extname
|
not valid_extensions.include? g.extname
|
||||||
(not allowed_non_libraries.include? extname) and (not valid_libraries.include? extname)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
unless non_libraries.empty?
|
unless non_libraries.empty?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user