summaryrefslogtreecommitdiff
path: root/mk/check
diff options
context:
space:
mode:
authortnn <tnn>2008-02-05 11:17:00 +0000
committertnn <tnn>2008-02-05 11:17:00 +0000
commit711ae6e69ff513799b22434e64c8805cb51cbd1b (patch)
tree5cf75c54d7ad58675a913f94e4b8480d11d4e24e /mk/check
parentc06ffc2d6111503b80e84300ae0426e123d8839b (diff)
downloadpkgsrc-711ae6e69ff513799b22434e64c8805cb51cbd1b.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/^/ /'; \