diff --git a/share/man/man8/MAKEDEV2manpage.pl b/share/man/man8/MAKEDEV2manpage.pl index 1d627d997c72..0ba3da974e4c 100644 --- a/share/man/man8/MAKEDEV2manpage.pl +++ b/share/man/man8/MAKEDEV2manpage.pl @@ -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 . All rights reserved. @@ -178,6 +178,16 @@ sub doarch 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() { + 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 @@ sub doarch } elsif (/^\@\@\@DEVICES\@\@\@$/) { do_devices(); } + } elsif (/(\$NetBSD.*\$)/) { + $id=$1; + $id=~s/\$/\\\$/g; + s/$id/$RCSID/; + print MANPAGE "$_"; } else { print MANPAGE "$_"; } @@ -228,19 +243,25 @@ chomp($pwd=`pwd`); 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:"); }