Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/man/man8 - allow specifying archs to process on comman...
details: https://anonhg.NetBSD.org/src/rev/35546d13f297
branches: trunk
changeset: 477095:35546d13f297
user: hubertf <hubertf%NetBSD.org@localhost>
date: Mon Oct 11 01:41:10 1999 +0000
description:
- allow specifying archs to process on command line
- align change message
- Most Important: read RCS Id from existing file and write it into the
newly generated file. That way, no update is announced when nothing
was changed. (Before, the RCS ID was reset to "$NetBSD$" which lead to
a changed file, but nothing of interrest changed)
diffstat:
share/man/man8/MAKEDEV2manpage.pl | 37 +++++++++++++++++++++++++++++--------
1 files changed, 29 insertions(+), 8 deletions(-)
diffs (73 lines):
diff -r 42fcd48385e6 -r 35546d13f297 share/man/man8/MAKEDEV2manpage.pl
--- a/share/man/man8/MAKEDEV2manpage.pl Mon Oct 11 01:36:21 1999 +0000
+++ b/share/man/man8/MAKEDEV2manpage.pl Mon Oct 11 01:41:10 1999 +0000
@@ -1,6 +1,6 @@
#!/usr/pkg/bin/perl
#
-# $NetBSD: MAKEDEV2manpage.pl,v 1.1 1999/09/18 00:15:13 hubertf Exp $
+# $NetBSD: MAKEDEV2manpage.pl,v 1.2 1999/10/11 01:41:10 hubertf Exp $
#
# Copyright (c) 1999
# Hubert Feyrer <hubert%feyrer.de@localhost>. All rights reserved.
@@ -178,6 +178,16 @@
rename("man8.${arch}/MAKEDEV.8", "man8.${arch}/MAKEDEV.8.old");
+ # find out current RCS ID
+ $RCSID="\$NetBSD\$";
+ open(OLD, "man8.${arch}/MAKEDEV.8.old") or die;
+ while(<OLD>) {
+ if (/(\$NetBSD.*\$)/) {
+ $RCSID = "$1";
+ }
+ }
+ close(OLD);
+
open(MANPAGE, ">man8.${arch}/MAKEDEV.8") or die;
print MANPAGE ".\\\" *** ------------------------------------------------------------------\n";
print MANPAGE ".\\\" *** This file was generated automatically\n";
@@ -199,6 +209,11 @@
} elsif (/^\@\@\@DEVICES\@\@\@$/) {
do_devices();
}
+ } elsif (/(\$NetBSD.*\$)/) {
+ $id=$1;
+ $id=~s/\$/\\\$/g;
+ s/$id/$RCSID/;
+ print MANPAGE "$_";
} else {
print MANPAGE "$_";
}
@@ -228,19 +243,25 @@
die "Run this in .../src/share/man/man8 !\n"
if ($pwd !~ m:share/man/man8: );
-# Determine available archs by looking for man8.*
-opendir(D, ".") || die;
-while ($d=readdir(D)) {
- if ($d =~ /man8\.(.*)$/) {
- push(@archs, $1);
+if ($#ARGV >= 0) {
+ @archs = @ARGV;
+
+} else {
+
+ # Determine available archs by looking for man8.*
+ opendir(D, ".") || die;
+ while ($d=readdir(D)) {
+ if ($d =~ /man8\.(.*)$/) {
+ push(@archs, $1);
+ }
}
+ closedir(d);
}
-closedir(d);
#DEBUG ONLY# @archs=("alpha");
# Handle each arch's manpage
foreach $arch ( sort @archs ) {
$rc = doarch($arch);
- print "$arch:\t $rc\n";
+ printf("%-20s $rc\n", "$arch:");
}
Home |
Main Index |
Thread Index |
Old Index