From ac5e4e9c9e27d1f9a2c76c6b911b3099d98deec3 Mon Sep 17 00:00:00 2001 From: Alexey Zelkin Date: Wed, 26 Nov 2003 10:43:05 +0000 Subject: [PATCH] Learn about new world order --- tools/diag/ac/cknames.pl | 28 +++++++++++++++++++--------- tools/diag/ac/ent.sh | 6 +++--- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/tools/diag/ac/cknames.pl b/tools/diag/ac/cknames.pl index 4363f65a174b..a3ffe3192f3c 100644 --- a/tools/diag/ac/cknames.pl +++ b/tools/diag/ac/cknames.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # -# Copyright (c) 2002 Alexey Zelkin +# Copyright (c) 2002,2003 Alexey Zelkin # 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 () { @@ -51,19 +57,23 @@ while () { } close PASSWD; -print "$cvs $accessfile\n"; -open (ACCESS, "$cvs $accessfile |") || die "checkout $accessfile: $!\n"; -while () { +foreach (@cvsroots) { + print "$cvs_pfx $_ $cvs_sfx $accessfile\n" if $debug; + open (ACCESS, "$cvs_pfx $_ $cvs_sfx $accessfile |") || + die "checkout $accessfile: $!\n"; + while () { 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 () { $author = $1 if /ENTITY a\.([^ ]+)/; next if !$author; diff --git a/tools/diag/ac/ent.sh b/tools/diag/ac/ent.sh index 83d50058de90..fbc2219dd4de 100644 --- a/tools/diag/ac/ent.sh +++ b/tools/diag/ac/ent.sh @@ -1,13 +1,13 @@ #!/bin/sh -x -# Copyright (c) 2002 Alexey Zelkin +# Copyright (c) 2002,2003 Alexey Zelkin # # 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