Skip to content

Commit

Permalink
Simplify check_non_libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
adamv committed Jun 27, 2012
1 parent 61a11ae commit e62c8aa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Library/Homebrew/formula_installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,11 @@ def check_jars
def check_non_libraries
return unless File.exist? f.lib

valid_libraries = %w(.a .dylib .framework .jnilib .la .o .so)
allowed_non_libraries = %w(.jar .prl .pm)
valid_extensions = %w(.a .dylib .framework .jnilib .la .o .so
.jar .prl .pm)
non_libraries = f.lib.children.select do |g|
next if g.directory?
extname = g.extname
(not allowed_non_libraries.include? extname) and (not valid_libraries.include? extname)
not valid_extensions.include? g.extname
end

unless non_libraries.empty?
Expand Down

0 comments on commit e62c8aa

Please sign in to comment.