Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/sets keep only the last entry for each file, before ...



details:   https://anonhg.NetBSD.org/src/rev/35d15255416a
branches:  trunk
changeset: 785009:35d15255416a
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Feb 17 23:56:52 2013 +0000

description:
keep only the last entry for each file, before sorting.

diffstat:

 distrib/sets/Makefile |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (21 lines):

diff -r 32902ec416bc -r 35d15255416a distrib/sets/Makefile
--- a/distrib/sets/Makefile     Sun Feb 17 20:49:16 2013 +0000
+++ b/distrib/sets/Makefile     Sun Feb 17 23:56:52 2013 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.84 2011/08/09 15:02:30 jmcneill Exp $
+#      $NetBSD: Makefile,v 1.85 2013/02/17 23:56:52 christos Exp $
 
 # Experimental RCS METALOG versioning
 # (Needs host's rcs(1) commands)
@@ -124,8 +124,9 @@
 METALOG.unpriv= -M ${METALOG}.sanitised
 sanitise_METALOG: .PHONY ${METALOG}.sanitised
 ${METALOG}.sanitised: ${METALOG}
-       sort ${METALOG} | \
-           ${TOOL_MTREE} -CSM -k all -N ${NETBSDSRCDIR}/etc \
+       ${TOOL_AWK} \
+           '{ a[$$1] = $$0; } END { for (f in a) print a[f]; }' ${METALOG} | \
+           sort | ${TOOL_MTREE} -CSM -k all -N ${NETBSDSRCDIR}/etc \
            >${METALOG}.new
        mv ${METALOG}.new ${METALOG}.sanitised
 .if defined(RCSMETALOG)



Home | Main Index | Thread Index | Old Index