emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals-release/org 439359b 3/6: manfull.pl: Avoid silent failu


From: ELPA Syncer
Subject: [elpa] externals-release/org 439359b 3/6: manfull.pl: Avoid silent failures
Date: Sat, 2 Oct 2021 13:57:30 -0400 (EDT)

branch: externals-release/org
commit 439359bff1106bed194ae94969d6bc98d5877196
Author: Max Nikulin <manikulin@gmail.com>
Commit: Bastien <bzg@gnu.org>

    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.
---
 mk/manfull.pl | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/mk/manfull.pl b/mk/manfull.pl
index 307ce39..39439bd 100755
--- a/mk/manfull.pl
+++ b/mk/manfull.pl
@@ -1,11 +1,14 @@
 #!/usr/bin/perl
 
+$failures = 0;
 
 while ($page = shift) {
 system "mv $page $page.orig";
 open IN,"<$page.orig" or die "Cannot read from $page.orig\n";
 open OUT,">$page" or die "Cannot write to $page\n";
 
+$toc = undef;
+
 while (<IN>) {
   if (/<meta http-equiv="Content-Style-Type" content="text\/css">/) {
     print OUT;
@@ -25,4 +28,11 @@ while (<IN>) {
   }
 }
 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";



reply via email to

[Prev in Thread] Current Thread [Next in Thread]