aboutgitcode
path: root/mbuto
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-04-06 15:26:59 +0200
committerStefano Brivio <sbrivio@redhat.com>2022-04-06 15:35:55 +0200
commitbc7bbfa08475f3ef43e5caf366a5c7730d6749da (patch)
tree156d7feed10030d5da1db4d56e25d2956676e06b /mbuto
parentb87e4f2e65958ef3d44ee640b6f9114cc5157a09 (diff)
downloadmbuto-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>
Diffstat (limited to 'mbuto')
-rwxr-xr-xmbuto22
1 files changed, 11 insertions, 11 deletions
diff --git a/mbuto b/mbuto
index 4f27242..6d447bc 100755
--- a/mbuto
+++ b/mbuto
@@ -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
}