Source-Changes-HG archive

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

[src/trunk]: src/share/man/man8 Only update the file when it changed.



details:   https://anonhg.NetBSD.org/src/rev/722175332be9
branches:  trunk
changeset: 487682:722175332be9
user:      veego <veego%NetBSD.org@localhost>
date:      Sun Jun 11 10:02:58 2000 +0000

description:
Only update the file when it changed.

diffstat:

 share/man/man8/MAKEDEV2manpage.pl |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r aa3d17df9971 -r 722175332be9 share/man/man8/MAKEDEV2manpage.pl
--- a/share/man/man8/MAKEDEV2manpage.pl Sun Jun 11 10:02:15 2000 +0000
+++ b/share/man/man8/MAKEDEV2manpage.pl Sun Jun 11 10:02:58 2000 +0000
@@ -1,6 +1,6 @@
 #!/usr/pkg/bin/perl
 #
-#      $NetBSD: MAKEDEV2manpage.pl,v 1.3 2000/05/02 00:15:41 hubertf Exp $
+#      $NetBSD: MAKEDEV2manpage.pl,v 1.4 2000/06/11 10:02:58 veego Exp $
 #
 # Copyright (c) 1999
 #      Hubert Feyrer <hubertf%netbsd.org@localhost>.  All rights reserved.
@@ -226,11 +226,13 @@
     close(MANPAGE);
 
     $rc=system("cmp >/dev/null 2>&1 'man8.${arch}/MAKEDEV.8.old' 'man8.${arch}/MAKEDEV.8'");
-    unlink("man8.${arch}/MAKEDEV.8.old");
 
     if ($rc) {
+       unlink("man8.${arch}/MAKEDEV.8.old");
        return "updated";
     } else {
+       unlink("man8.${arch}/MAKEDEV.8");
+       rename("man8.${arch}/MAKEDEV.8.old", "man8.${arch}/MAKEDEV.8");
        return "unchanged";
     }
 }



Home | Main Index | Thread Index | Old Index