Commit ed5ac6f4 authored by gsell's avatar gsell

Merge branch '92-fix-installation-of-system-shared-libraries-as-fallback' into 'master'

Resolve "fix: installation of system shared libraries as fallback"

Closes #92

See merge request !56
parents 766f6bd1 94d57557
...@@ -600,14 +600,20 @@ pbuild::install_shared_libs() { ...@@ -600,14 +600,20 @@ pbuild::install_shared_libs() {
install_shared_libs_Linux() { install_shared_libs_Linux() {
local libs=( $(ldd "${binary}" | \ local libs=( $(ldd "${binary}" | \
awk "/ => \// && /${pattern}/ {print \$3}") ) 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() { install_shared_libs_Darwin() {
# https://stackoverflow.com/questions/33991581/install-name-tool-to-update-a-executable-to-search-for-dylib-in-mac-os-x # 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}" | \ local libs=( $(otool -L "${binary}" | \
awk "/${pattern}/ {print \$1}")) 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}" || \ test -e "${binary}" || \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment