From 98a71ea74d2ad009a53eb46b9d659e089166ae27 Mon Sep 17 00:00:00 2001 From: metworkbot Date: Mon, 10 Feb 2025 10:17:11 +0000 Subject: [PATCH] build: sync common files from github_organization_management repository --- integration_tests/revert_ldd_not_found.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 integration_tests/revert_ldd_not_found.sh diff --git a/integration_tests/revert_ldd_not_found.sh b/integration_tests/revert_ldd_not_found.sh new file mode 100755 index 0000000..6ae7c34 --- /dev/null +++ b/integration_tests/revert_ldd_not_found.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +function usage() { + echo "revert_ldd.sh /path" + echo " => execute this in a directory and it will try to find who" + echo " need this shared library" +} + +if test "$1" = ""; then + usage + exit 1 +fi +if test "$1" = "--help"; then + usage + exit 0 +fi + +for F in $(find . -type f -name "*.so*" ; find . -type f -wholename "*/bin/*"); do + N=$(ldd "${F}" 2>/dev/null |grep "=>" |awk -F '=>' '{print $1;}' |grep -c "$1") + if test "$N" -gt 0; then + echo "${F}" + fi +done