diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2022-04-06 15:26:59 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-04-06 15:35:55 +0200 |
commit | bc7bbfa08475f3ef43e5caf366a5c7730d6749da (patch) | |
tree | 156d7feed10030d5da1db4d56e25d2956676e06b | |
parent | b87e4f2e65958ef3d44ee640b6f9114cc5157a09 (diff) | |
download | mbuto-bc7bbfa08475f3ef43e5caf366a5c7730d6749da.tar mbuto-bc7bbfa08475f3ef43e5caf366a5c7730d6749da.tar.gz mbuto-bc7bbfa08475f3ef43e5caf366a5c7730d6749da.tar.bz2 mbuto-bc7bbfa08475f3ef43e5caf366a5c7730d6749da.tar.lz mbuto-bc7bbfa08475f3ef43e5caf366a5c7730d6749da.tar.xz mbuto-bc7bbfa08475f3ef43e5caf366a5c7730d6749da.tar.zst mbuto-bc7bbfa08475f3ef43e5caf366a5c7730d6749da.zip |
mbuto: Add IFS-setting wrapper for libs_copy()
This avoids the need to set IFS and reset it around libs_copy()
calls.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rwxr-xr-x | mbuto | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -548,9 +548,9 @@ libs_dlopen_copy() { done } -# libs_copy() - Recursively copy shared dependencies for programs and libraries +# __libs_copy() - Recursively copy shared dependencies for programs, libraries # $1: Host path to program or library -libs_copy() { +__libs_copy() { info "Sourcing shared object dependencies for ${1}" # ldd might succeed and print errors on stdout when paths are not found. @@ -591,6 +591,15 @@ libs_copy() { fi } +# libs_copy() - Call __libs_copy with tabs and newlines as IFS +# $@: Arguments to __libs_copy +libs_copy() { + IFS=' +' + __libs_copy "${@}" + unset IFS +} + ################################################################################ @@ -639,10 +648,7 @@ prog_add() { "${__target}" "${__l}" done - IFS=' -' libs_copy "${__bin}" - unset IFS } ################################################################################ @@ -762,10 +768,7 @@ pkg_deb_add() { __type="$("${FILE}" -bi "${wd}/${__f}")" if [ "${__type%%;*}" = "application/x-sharedlib" ] || [ "${__type%%;*}" = "application/x-executable" ]; then - IFS=' -' libs_copy "${wd}/${__f}" - unset IFS fi done } @@ -783,10 +786,7 @@ pkg_rpm_add() { __type="$("${FILE}" -bi "${wd}/${__f}")" if [ "${__type%%;*}" = "application/x-sharedlib" ] || [ "${__type%%;*}" = "application/x-executable" ]; then - IFS=' -' libs_copy "${wd}/${__f}" - unset IFS fi done } |