From 4d7a15ed3b3177ef42cbbc87db8d53f44942544f Mon Sep 17 00:00:00 2001 From: Adrian Malacoda Date: Wed, 27 Jan 2021 19:37:57 -0600 Subject: [PATCH] blasphemy: exclude directories that we know won't contain the library we're looking for, so as to speed it up --- blasphemy | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/blasphemy b/blasphemy index 566fead..837c7d9 100755 --- a/blasphemy +++ b/blasphemy @@ -46,6 +46,10 @@ def find_library(library): def find_library_in_search_path(library, path): for (dirpath, dirnames, filenames) in os.walk(path): + for name in ["sbin", "bin", "share", "include", "etc", "site-packages", "src", "vendor_ruby", "kernel"]: + if name in dirnames: + dirnames.remove(name) + if library in filenames: library_path = os.path.join(dirpath, library) if "ELF 64-bit" in file_type(library_path):