aboutsummaryrefslogtreecommitdiff
path: root/sbopkglint.d/15-noarch.t.sh
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-06-17 04:43:29 -0400
committerB. Watson <urchlay@slackware.uk>2023-06-17 04:43:29 -0400
commit695d606224bc3dae5a2aa96581d1af49310822b2 (patch)
treee65548049fcc383f5f98af5a4ca3f405bff1917a /sbopkglint.d/15-noarch.t.sh
parentc8407a74a3013f09495edba29705c7b481e46f19 (diff)
downloadsbo-maintainer-tools-695d606224bc3dae5a2aa96581d1af49310822b2.tar.gz
sbopkglint: spaces in filenames WIP #9.
Diffstat (limited to 'sbopkglint.d/15-noarch.t.sh')
-rw-r--r--sbopkglint.d/15-noarch.t.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/sbopkglint.d/15-noarch.t.sh b/sbopkglint.d/15-noarch.t.sh
index 7480ba8..1d4c0fc 100644
--- a/sbopkglint.d/15-noarch.t.sh
+++ b/sbopkglint.d/15-noarch.t.sh
@@ -10,13 +10,15 @@
# for packages that aren't noarch, recommend noarch if it looks like one.
# the recommendation is not an error!
-elfbins="$( find * -type f -print0 | xargs -0 file -m /etc/file/magic/elf | grep ELF | cut -d: -f1 )"
+find . -type f -print0 | xargs -0 file -m /etc/file/magic/elf | grep ELF | cut -d: -f1 | xargs -d "\n" ls -lb > .elfbins.$$
if [ "$ARCH" = "noarch" ]; then
- [ -n "$elfbins" ] && \
+ [ -s .elfbins.$$ ] && \
warn "package claims to be noarch, but contains ELF binaries:" && \
- ls -l $elfbins
-elif [ -z "$elfbins" ] && [ ! -e usr/lib ] && [ ! -e usr/lib64 ]; then
+ cat .elfbins.$$
+elif [ ! -s .elfbins.$$ ] && [ ! -e usr/lib ] && [ ! -e usr/lib64 ]; then
x="$( find usr/share/pkgconfig -type f -exec grep 'usr/lib' {} \+ 2>/dev/null )"
[ -z "$x" ] && note "package might be a good candidate for noarch"
fi
+
+rm -f .elfbins.$$