aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <duncaen@voidlinux.org>2023-08-31 12:17:24 +0000
committerDuncaen <duncaen@voidlinux.org>2023-08-31 12:18:14 +0000
commit65c9ade5e44afcf8040f5459e59b9f3819879fca (patch)
tree8c9300b24538533617ec532423b73215d539b30c
parent9e68e66a04cf74153e82b6b9bc5b0e0ef5bfba5a (diff)
downloadvoid-packages-65c9ade5e44afcf8040f5459e59b9f3819879fca.tar
void-packages-65c9ade5e44afcf8040f5459e59b9f3819879fca.tar.gz
void-packages-65c9ade5e44afcf8040f5459e59b9f3819879fca.tar.bz2
void-packages-65c9ade5e44afcf8040f5459e59b9f3819879fca.tar.lz
void-packages-65c9ade5e44afcf8040f5459e59b9f3819879fca.tar.xz
void-packages-65c9ade5e44afcf8040f5459e59b9f3819879fca.tar.zst
void-packages-65c9ade5e44afcf8040f5459e59b9f3819879fca.zip
xbps-src: consistently use read -r when reading file paths
-rw-r--r--common/hooks/post-install/00-compress-info-files.sh3
-rw-r--r--common/hooks/post-install/00-uncompress-manpages.sh3
-rw-r--r--common/hooks/post-install/03-remove-empty-dirs.sh2
-rw-r--r--common/hooks/post-install/06-strip-and-debug-pkgs.sh2
-rw-r--r--common/hooks/pre-pkg/04-generate-runtime-deps.sh2
-rw-r--r--common/hooks/pre-pkg/99-pkglint.sh2
6 files changed, 6 insertions, 8 deletions
diff --git a/common/hooks/post-install/00-compress-info-files.sh b/common/hooks/post-install/00-compress-info-files.sh
index ee394a8c901..0a1bec5360c 100644
--- a/common/hooks/post-install/00-compress-info-files.sh
+++ b/common/hooks/post-install/00-compress-info-files.sh
@@ -15,8 +15,7 @@ hook() {
rm -f ${PKGDESTDIR}/usr/share/info/dir
fi
- find ${PKGDESTDIR}/usr/share/info -type f -follow | while read f
- do
+ find ${PKGDESTDIR}/usr/share/info -type f -follow | while read -r f; do
j=$(echo "$f"|sed -e "$fpattern")
[ "$j" = "" ] && continue
[ "$j" = "/usr/share/info/dir" ] && continue
diff --git a/common/hooks/post-install/00-uncompress-manpages.sh b/common/hooks/post-install/00-uncompress-manpages.sh
index c7a4e470157..3c0d2e2392e 100644
--- a/common/hooks/post-install/00-uncompress-manpages.sh
+++ b/common/hooks/post-install/00-uncompress-manpages.sh
@@ -9,8 +9,7 @@ hook() {
fi
# rewrite symlinks
- find $mandir -type l -regex '.*\.\(gz\|bz2\)' | while read f
- do
+ find $mandir -type l -regex '.*\.\(gz\|bz2\)' | while read -r f; do
lnkat=$(readlink "$f")
ln -s ${lnkat%.*} ${f%.*}
rm $f
diff --git a/common/hooks/post-install/03-remove-empty-dirs.sh b/common/hooks/post-install/03-remove-empty-dirs.sh
index c54f458f61e..06354fc7f5c 100644
--- a/common/hooks/post-install/03-remove-empty-dirs.sh
+++ b/common/hooks/post-install/03-remove-empty-dirs.sh
@@ -2,7 +2,7 @@
hook() {
if [ -d "${PKGDESTDIR}" ]; then
- find "${PKGDESTDIR}" -mindepth 1 -type d -empty -print -delete|sort -r|while read f; do
+ find "${PKGDESTDIR}" -mindepth 1 -type d -empty -print -delete|sort -r|while read -r f; do
_dir="${f##${PKGDESTDIR}}"
msg_warn "$pkgver: removed empty dir: ${_dir}\n"
done
diff --git a/common/hooks/post-install/06-strip-and-debug-pkgs.sh b/common/hooks/post-install/06-strip-and-debug-pkgs.sh
index 191c025e552..b6bd52320dc 100644
--- a/common/hooks/post-install/06-strip-and-debug-pkgs.sh
+++ b/common/hooks/post-install/06-strip-and-debug-pkgs.sh
@@ -65,7 +65,7 @@ hook() {
STRIPCMD=/usr/bin/$STRIP
- find ${PKGDESTDIR} -type f | while read f; do
+ find ${PKGDESTDIR} -type f | while read -r f; do
if [[ $f =~ ^${PKGDESTDIR}/usr/lib/debug/ ]]; then
continue
fi
diff --git a/common/hooks/pre-pkg/04-generate-runtime-deps.sh b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
index e2020ce05f7..f9cef1395fd 100644
--- a/common/hooks/pre-pkg/04-generate-runtime-deps.sh
+++ b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
@@ -70,7 +70,7 @@ hook() {
exec 3<&0 # save stdin
exec < $depsftmp
- while read f; do
+ while read -r f; do
lf=${f#${PKGDESTDIR}}
if [ "${skiprdeps/${lf}/}" != "${skiprdeps}" ]; then
msg_normal "Skipping dependency scan for ${lf}\n"
diff --git a/common/hooks/pre-pkg/99-pkglint.sh b/common/hooks/pre-pkg/99-pkglint.sh
index a3ed816ed6e..30d97fcda40 100644
--- a/common/hooks/pre-pkg/99-pkglint.sh
+++ b/common/hooks/pre-pkg/99-pkglint.sh
@@ -171,7 +171,7 @@ hook() {
_pattern="^${_shlib}\.so\.[0-9]+(.*)[[:blank:]]+${_pkgname}-[^-]+_[0-9]+"
fi
grep -E "${_pattern}" $mapshlibs | { \
- while read conflictFile conflictPkg ignore; do
+ while read -r conflictFile conflictPkg ignore; do
found=1
conflictRev=${conflictFile#*.so.}
if [ -n "$ignore" -a "$ignore" != "$XBPS_TARGET_MACHINE" ]; then