diff options
| author | Adam Vandenberg | 2012-06-14 09:55:05 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-06-27 10:21:28 -0700 |
| commit | e62c8aaed39456f10c420a4e4775938ca886dec2 (patch) | |
| tree | 1424402efef05cf97f3dcda33e36ffaa5195b488 /Library | |
| parent | 61a11aea02682a7587291c63e8988e2d40a2eee3 (diff) | |
| download | homebrew-e62c8aaed39456f10c420a4e4775938ca886dec2.tar.bz2 | |
Simplify check_non_libraries
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 338bd4771..9d4b3b492 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -326,12 +326,11 @@ class FormulaInstaller 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? |
