start working on HTML results
[pspp] / results2html
index 448d1e5e415eeb08d0c933fa15cc0311b5fa03f6..c6aaab634d1724057a80e7c0676dc76c237c2283 100755 (executable)
@@ -38,7 +38,6 @@ my (%vars) = read_vars ('VARS');
 
 my (@products);
 my (@steps);
-my ($new_page) = 0;
 my ($result) = "failure";
 my (%dist_files);
 my ($dist_dir);
@@ -47,13 +46,6 @@ while (<LOG>) {
     my $ln = $.;
     chomp;
 
-    if (/^\f$/) {
-       $new_page = 1;
-       @dirstack = ();
-       print LOG_HTML "</pre><hr><pre>\n";
-       next;
-    }
-
     if (/Entering directory `(.*)'$/) {
         push (@dirstack, $1);
     } elsif (/Leaving directory `(.*)'$/) {
@@ -61,10 +53,9 @@ while (<LOG>) {
     }
 
     my $log_class;
-    if ($new_page) {
-       $new_page = 0;
+    if (my ($title) = /^## (.*) ##$/) {
        $log_class = "step";
-       if (my ($name, $product) = /^Saving(?:\s+([^:]*):)?\s+(.*)$/) {
+       if (my ($name, $product) = $title =~ /^Saving(?:\s+([^:]*):)?\s+(.*)$/) {
            my $href = "$product/index.html";
            $href = $product if ! -e $href;
 
@@ -88,13 +79,14 @@ while (<LOG>) {
                }
                close (DIST);
            }
-       } else {
+       } elsif ($title eq 'Success') {
+           $result = 'success';
+       } elsif ($title !~ /^-+$/) {
            my (%s);
-           $s{TITLE} = $_;
+           $s{TITLE} = $title;
            $s{LN} = $ln;
            push (@steps, \%s);
        }
-       $result = 'success' if $_ eq 'Success';
     } else {
        if (my ($diagnostic) = /(error|warning):/i) {
            my (%d);