Learn about new world order

This commit is contained in:
Alexey Zelkin 2003-11-26 10:43:05 +00:00
parent 5bd361ab30
commit ac5e4e9c9e
2 changed files with 22 additions and 12 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/perl -w
#
# Copyright (c) 2002 Alexey Zelkin <phantom@FreeBSD.org>
# Copyright (c) 2002,2003 Alexey Zelkin <phantom@FreeBSD.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -37,9 +37,15 @@ $debug = 0;
$accessfile = "CVSROOT/access";
$authorsfile = "doc/en_US.ISO8859-1/share/sgml/authors.ent";
$cvsroot = $ENV{'CVSROOT'};
$cvsroot = "/home/ncvs" if !$cvsroot;
$cvs = "cvs -R -d $cvsroot co -p";
@cvsroots = qw(
/home/ncvs
/home/pcvs
/home/dcvs
);
$doccvsroot = "/home/dcvs";
$cvs_pfx = "cvs -Q -R -d ";
$cvs_sfx = " co -p";
open(PASSWD, 'ypcat passwd |') || die "open passwd data: $!\n";
while (<PASSWD>) {
@ -51,19 +57,23 @@ while (<PASSWD>) {
}
close PASSWD;
print "$cvs $accessfile\n";
open (ACCESS, "$cvs $accessfile |") || die "checkout $accessfile: $!\n";
while (<ACCESS>) {
foreach (@cvsroots) {
print "$cvs_pfx $_ $cvs_sfx $accessfile\n" if $debug;
open (ACCESS, "$cvs_pfx $_ $cvs_sfx $accessfile |") ||
die "checkout $accessfile: $!\n";
while (<ACCESS>) {
chomp;
next if /^#/;
($accuser, undef) = split /\s/;
$accuser =~ s/_//g;
print "access user: $accuser\n" if $debug;
$access{$accuser} = 1;
}
close ACCESS;
}
close ACCESS;
open (AUTHORS, "$cvs $authorsfile |") || die "checkout $authorsfile: $!\n";
open (AUTHORS, "$cvs_pfx $doccvsroot $cvs_sfx $authorsfile |") ||
die "checkout $authorsfile: $!\n";
while (<AUTHORS>) {
$author = $1 if /ENTITY a\.([^ ]+)/;
next if !$author;

View File

@ -1,13 +1,13 @@
#!/bin/sh -x
# Copyright (c) 2002 Alexey Zelkin <phantom@FreeBSD.org>
# Copyright (c) 2002,2003 Alexey Zelkin <phantom@FreeBSD.org>
#
# ent.sh -- this script checks {authors,teams}.ent files for correctness
#
# $FreeBSD$
: ${CVSROOT=/home/ncvs}
: ${CVSROOT=/home/dcvs}
prefix=doc/en_US.ISO8859-1/share/sgml
cvs='cvs -Q co -p'
cvs='cvs -Q -R co -p'
diff='diff -u'
tmp=${TMPDIR-/tmp}/_entities