Detect ld.so with homebrew binaries

This commit is contained in:
q3aql 2024-06-23 22:50:43 +02:00
parent aea0068cc3
commit 164f5aae4e

View File

@ -70,7 +70,7 @@ if [ ! -z "${1}" ] ; then
exit 1 exit 1
else else
libs="$(ldd "${1}" | grep -F '/' | sed -E 's|[^/]*/([^ ]+).*?|/\1|')" libs="$(ldd "${1}" | grep -F '/' | sed -E 's|[^/]*/([^ ]+).*?|/\1|')"
ld_so="$(echo "$libs" | grep -F '/ld-linux-' || echo "$libs" | grep -F '/ld-musl-')" ld_so="$(echo "$libs" | grep -F '/ld-linux-' || echo "$libs" | grep -F '/ld-musl-' || echo "$libs" | grep -F '/ld.so')"
ld_so="$(basename "$ld_so")" ld_so="$(basename "$ld_so")"
program="$(basename "${1}")" program="$(basename "${1}")"
if [ -z "${libs}" ] ; then if [ -z "${libs}" ] ; then