Created
June 9, 2013 13:06
-
-
Save MOZGIII/5743445 to your computer and use it in GitHub Desktop.
Filter Qt plugins by dependencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
allowed_libs = %w{ | |
libQtCore.so.4 | |
libQtNetwork.so.4 | |
libQtWebKit.so.4 | |
libQtGui.so.4 | |
} | |
puts "Allowed libs: " | |
allowed_libs.each do |lib| | |
puts " #{lib}" | |
end | |
puts | |
Dir["plugins/*/*.so"].each do |file| | |
list = `ldd "#{file}" | grep Qt`.split("\n").map{|e| e.scan(/(lib[^\s]*\.so[^\s]+)/)[0][0] } | |
list -= allowed_libs | |
unless list.empty? | |
# puts "="*80 | |
puts file | |
puts list.map{|e| " " + e} | |
puts | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment