2000-06-28 16:37:09 -04:00
|
|
|
#!/usr/local/bin/perl -w
|
|
|
|
|
#
|
2016-06-27 00:56:38 -04:00
|
|
|
# Copyright (C) 2000, 2001, 2004, 2007, 2012, 2016 Internet Systems Consortium, Inc. ("ISC")
|
2012-06-28 21:39:47 -04:00
|
|
|
#
|
2016-06-27 00:56:38 -04:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2000-06-28 16:37:09 -04:00
|
|
|
|
2012-03-06 20:41:11 -05:00
|
|
|
# $Id$
|
2000-06-28 16:37:09 -04:00
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Replace internet drafts with updated versions, if any.
|
|
|
|
|
#
|
|
|
|
|
# Usage:
|
|
|
|
|
#
|
|
|
|
|
# cd doc/draft
|
|
|
|
|
# perl ../../util/update-drafts.pl *.txt
|
|
|
|
|
# (ignore "404 Not Found" errors from FTP)
|
|
|
|
|
# cvs commit -m"updated drafts"
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
foreach (@ARGV) {
|
|
|
|
|
$ofile = $_;
|
|
|
|
|
if (/^(.*-)([0-9][0-9])(\.txt)/) {
|
|
|
|
|
$nfile = "$1" . sprintf("%02d", $2 + 1) . "$3";
|
|
|
|
|
print $nfile, "\n";
|
|
|
|
|
system "ftp http://www.ietf.org/internet-drafts/$nfile";
|
|
|
|
|
if ($? == 0) {
|
|
|
|
|
unlink($ofile);
|
|
|
|
|
system "cvs remove $ofile";
|
2000-07-31 21:33:37 -04:00
|
|
|
system "cvs add $nfile";
|
2000-06-28 16:37:09 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|