From 21eead8d171c73ce0baa96f1ed8ab0176cff25de Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 24 Feb 2019 11:45:55 +0000 Subject: [PATCH] Add script to search for missing libraries Signed-off-by: Michael Tremer --- tools/find-missing-libs.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tools/find-missing-libs.sh diff --git a/tools/find-missing-libs.sh b/tools/find-missing-libs.sh new file mode 100644 index 0000000000..624ee008dd --- /dev/null +++ b/tools/find-missing-libs.sh @@ -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 $? -- 2.39.2