From: Michael Tremer Date: Sun, 24 Feb 2019 11:45:55 +0000 (+0000) Subject: Add script to search for missing libraries X-Git-Tag: v2.21-core128~1 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=21eead8d171c73ce0baa96f1ed8ab0176cff25de;hp=232c42e14d44fc1c3c3a11eb65117e406c2c90e1 Add script to search for missing libraries Signed-off-by: Michael Tremer --- 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 $?