From 94d57557b4415871cc7317d6c4dd80d0d4265b0d Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Mon, 25 May 2020 17:27:01 +0200 Subject: [PATCH] bug in installing shared libs fixed --- Pmodules/libpbuild.bash | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Pmodules/libpbuild.bash b/Pmodules/libpbuild.bash index cff6983..0a34c5b 100644 --- a/Pmodules/libpbuild.bash +++ b/Pmodules/libpbuild.bash @@ -600,14 +600,20 @@ pbuild::install_shared_libs() { install_shared_libs_Linux() { local libs=( $(ldd "${binary}" | \ awk "/ => \// && /${pattern}/ {print \$3}") ) - [[ -n "${libs}" ]] && cp -vL "${libs[@]}" "${dstdir}" + if [[ -n "${libs}" ]]; then + cp -vL "${libs[@]}" "${dstdir}" || return $? + fi + return 0 } install_shared_libs_Darwin() { # https://stackoverflow.com/questions/33991581/install-name-tool-to-update-a-executable-to-search-for-dylib-in-mac-os-x local libs=( $(otool -L "${binary}" | \ awk "/${pattern}/ {print \$1}")) - [[ -n "${libs}" ]] && cp -vL "${libs[@]}" "${dstdir}" + if [[ -n "${libs}" ]]; then + cp -vL "${libs[@]}" "${dstdir}" || return $? + fi + return 0 } test -e "${binary}" || \