pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/check No need to walk the whole directory when chec...
details: https://anonhg.NetBSD.org/pkgsrc/rev/42f75b99b7c2
branches: trunk
changeset: 538297:42f75b99b7c2
user: tnn <tnn%pkgsrc.org@localhost>
date: Tue Feb 05 11:17:00 2008 +0000
description:
No need to walk the whole directory when checking for emptyness.
>From Robert Elz.
diffstat:
mk/check/check-fakehome.mk | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (20 lines):
diff -r 2a437d2caac6 -r 42f75b99b7c2 mk/check/check-fakehome.mk
--- a/mk/check/check-fakehome.mk Tue Feb 05 11:02:35 2008 +0000
+++ b/mk/check/check-fakehome.mk Tue Feb 05 11:17:00 2008 +0000
@@ -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 @@
_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/^/ /'; \
Home |
Main Index |
Thread Index |
Old Index