Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/sets In "make sortlists", if the file was already so...
details: https://anonhg.NetBSD.org/src/rev/cd21c4656f0e
branches: trunk
changeset: 791008:cd21c4656f0e
user: apb <apb%NetBSD.org@localhost>
date: Wed Oct 30 15:17:01 2013 +0000
description:
In "make sortlists", if the file was already sorted then don't
change its timestamp.
diffstat:
distrib/sets/Makefile | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (25 lines):
diff -r 6077521506da -r cd21c4656f0e distrib/sets/Makefile
--- a/distrib/sets/Makefile Wed Oct 30 15:15:12 2013 +0000
+++ b/distrib/sets/Makefile Wed Oct 30 15:17:01 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.89 2013/10/27 09:29:42 apb Exp $
+# $NetBSD: Makefile,v 1.90 2013/10/30 15:17:01 apb Exp $
# Experimental RCS METALOG versioning
# (Needs host's rcs(1) commands)
@@ -314,8 +314,13 @@
${_MKSHMSG} "sorting $${f#${.CURDIR}/}" ; \
{ grep '^#' "$$f" ; \
grep -v '^#' "$$f" | sort ; \
- } >"$$f".tmp \
- && mv "$$f".tmp "$$f" ; \
+ } >"$$f".tmp; \
+ if cmp "$$f" "$$f".tmp >/dev/null; then \
+ : "$$f is unchanged" ; \
+ rm "$$f".tmp ; \
+ else \
+ mv "$$f".tmp "$$f" ; \
+ fi ; \
done
#
Home |
Main Index |
Thread Index |
Old Index