forked from mirrors/org-mode
manfull.pl: Avoid silent failures
* mk/manfull.pl: Report failures of patching of single-page HTML manuals. It should prevent silent generating of manual pages inconsistent with provided CSS files when output of makeinfo will change next time.
This commit is contained in:
parent
b7df8307ec
commit
439359bff1
|
@ -1,11 +1,14 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
$failures = 0;
|
||||||
|
|
||||||
while ($page = shift) {
|
while ($page = shift) {
|
||||||
system "mv $page $page.orig";
|
system "mv $page $page.orig";
|
||||||
open IN,"<$page.orig" or die "Cannot read from $page.orig\n";
|
open IN,"<$page.orig" or die "Cannot read from $page.orig\n";
|
||||||
open OUT,">$page" or die "Cannot write to $page\n";
|
open OUT,">$page" or die "Cannot write to $page\n";
|
||||||
|
|
||||||
|
$toc = undef;
|
||||||
|
|
||||||
while (<IN>) {
|
while (<IN>) {
|
||||||
if (/<meta http-equiv="Content-Style-Type" content="text\/css">/) {
|
if (/<meta http-equiv="Content-Style-Type" content="text\/css">/) {
|
||||||
print OUT;
|
print OUT;
|
||||||
|
@ -25,4 +28,11 @@ while (<IN>) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
system "rm $page.orig";
|
system "rm $page.orig";
|
||||||
|
|
||||||
|
if (!defined($toc) || $toc != 0) {
|
||||||
|
++$failures;
|
||||||
|
print STDERR "Patching of $page failed\n";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$failures == 0 or die "Patching of $failures files failed\n";
|
||||||
|
|
Loading…
Reference in a new issue