update_branches revision 35665db4e49e3e4c0e3776e635449f931f3732cf
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Permission to use, copy, modify, and distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# purpose with or without fee is hereby granted, provided that the above
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# copyright notice and this permission notice appear in all copies.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
83a28ca274521e15086fc39febde507bcc4e145eMark Andrews# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# PERFORMANCE OF THIS SOFTWARE.
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# $Id: update_branches,v 1.5 2005/05/16 06:57:51 marka Exp $
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt!system("cvs", "-d", "/proj/cvs/prod", "update", "doc/private/branches") || die "cannot update doc/private/branches: $!";
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# load existing content
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Huntopen(BRANCHES, "<doc/private/branches") || die "can't open util/branches: $!";
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# Search repository for new branches.
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Huntopen(FILES, "find /proj/cvs/prod/bind9 -type f -name *,v -print |") || die "can't start find: $!";
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt next unless m/^symbols$/; # skip until we find the tags
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# Write out updated version.
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Huntopen(BRANCHES, ">doc/private/newbranches") || die "can't open doc/private/branches: $!";
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Huntprint BRANCHES "\nBranch\t\t\t\tStatus\tWhom\t(Comments)\n";
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Huntprint BRANCHES "----------------------------------------------------------\n\n";
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt print BRANCHES "\t$comments{$key}" if ($comments{$key} ne "");
$tabs = 1;
$tabs++;
rename("doc/private/newbranches", "doc/private/branches") || die "Cannot rename: doc/private/newbranches -> doc/private/branches: $!";