summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-06-15 17:08:28 +0000
committerNick Mathewson <nickm@torproject.org>2008-06-15 17:08:28 +0000
commit16edff2185e49fe2c6e3b6940b6c2bab951b97db (patch)
tree583163b1923224628401e6ff9c0edc9804c05941
parent8555a768fdbb5a82a0dba2cd11fd468dd4df366d (diff)
downloadtor-16edff2185e49fe2c6e3b6940b6c2bab951b97db.tar.gz
tor-16edff2185e49fe2c6e3b6940b6c2bab951b97db.zip
Update reindex script to check filename lines.
svn:r15278
-rwxr-xr-xdoc/spec/proposals/reindex.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/spec/proposals/reindex.pl b/doc/spec/proposals/reindex.pl
index adffbd7f11..be1ef1ffc4 100755
--- a/doc/spec/proposals/reindex.pl
+++ b/doc/spec/proposals/reindex.pl
@@ -22,6 +22,7 @@ for my $f (@files) {
my $num = substr($f, 0, 3);
my $status = undef;
my $title = undef;
+ my $alleged_fname = undef;
if ($f !~ /\.txt/) { print "$f doesn't end with .txt\n"; }
open(F, "$f");
while (<F>) {
@@ -30,6 +31,10 @@ for my $f (@files) {
$status = uc $1;
chomp $status;
}
+ if (/^Filename: (.*)/) {
+ $alleged_fname = $1;
+ chomp $alleged_fname;
+ }
if (/^Title: (.*)/) {
$title = $1;
$title =~ s/\.$//;
@@ -41,6 +46,9 @@ for my $f (@files) {
unless (grep(/$status/, @KNOWN_STATUSES) == 1);
die "Proposal $num has a bad status line" if (!defined $status);
die "Proposal $num has a bad title line" if (!defined $title);
+ die "Proposal $num has no Filename line" unless (defined $alleged_fname);
+ die "Proposal $num says its fname is $alleged_fname, but it's really $f"
+ if ($alleged_fname ne $f);
$title{$num} = $title;
$status{$num} = $status;
}