summaryrefslogtreecommitdiff
path: root/mk/check
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2008-02-05 11:17:00 +0000
committertnn <tnn@pkgsrc.org>2008-02-05 11:17:00 +0000
commit96ef75e1ddc58ba04bc4f87cb299fff7f8c4ac64 (patch)
tree5cf75c54d7ad58675a913f94e4b8480d11d4e24e /mk/check
parentf19a94e1d7aed627f94a9ca219249a995a7347f3 (diff)
downloadpkgsrc-96ef75e1ddc58ba04bc4f87cb299fff7f8c4ac64.tar.gz
No need to walk the whole directory when checking for emptyness.
From Robert Elz.
Diffstat (limited to 'mk/check')
-rw-r--r--mk/check/check-fakehome.mk6
1 files changed, 3 insertions, 3 deletions
diff --git a/mk/check/check-fakehome.mk b/mk/check/check-fakehome.mk
index c7743cf7cd8..fb047a97730 100644
--- a/mk/check/check-fakehome.mk
+++ b/mk/check/check-fakehome.mk
@@ -1,4 +1,4 @@
-# $NetBSD: check-fakehome.mk,v 1.1 2008/02/05 09:45:00 tnn Exp $
+# $NetBSD: check-fakehome.mk,v 1.2 2008/02/05 11:17:00 tnn Exp $
#
# This file checks that the package does not install files to $HOME.
#
@@ -31,8 +31,8 @@ privileged-install-hook: _check-fakehome
_check-fakehome: .PHONY
${RUN} if [ `ls -a ${FAKEHOMEDIR:Q} | ${AWK} \
- '{if ($$0 != "." && $$0 != "..") cnt++} \
- END {print cnt?1:0}' \
+ '{if ($$0 != "." && $$0 != "..") {x=1; exit}} \
+ END {print x + 0}' \
` = 1 ]; then \
${WARNING_MSG} "[check-fakehome.mk] fake home directory not empty:"; \
find ${FAKEHOMEDIR} -print | ${SED} 's/^/ /'; \