]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Add script to search for missing libraries
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 24 Feb 2019 11:45:55 +0000 (11:45 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 24 Feb 2019 11:45:55 +0000 (11:45 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tools/find-missing-libs.sh [new file with mode: 0644]

diff --git a/tools/find-missing-libs.sh b/tools/find-missing-libs.sh
new file mode 100644 (file)
index 0000000..624ee00
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+# This scripts lists binaries that have missing libraries.
+# Arguments are paths to search in
+
+main() {
+       local path
+       for path in $@; do
+               local file
+               for file in $(find "${path}" -type f); do
+                       if ldd "${file}" 2>/dev/null | grep -q "not found"; then
+                               echo "${file}"
+                               ldd "${file}"
+                       fi
+               done
+       done
+}
+
+main "$@" || exit $?