Update GPG key for signing flatpaks.
[pspp] / results2html
index a5a7688e5a8b040e534be21267409628eb6f635b..b330c871abbdae8a74df08a6fa36cb5d52eb6c3b 100755 (executable)
@@ -3,6 +3,7 @@
 use strict;
 use warnings;
 
+use Digest::SHA;
 use File::Spec;
 use HTML::Entities qw();
 use URI::Escape;
@@ -79,7 +80,7 @@ while (<LOG>) {
            $p{HREF} = $href;
            $p{LN} = $ln;
            push (@products, \%p);
-           push (@{$steps[$#steps]{CHILDREN}}, \%p);
+           push (@{$steps[$#steps]{CHILDREN}}, \%p) if @steps;
 
            if (defined ($name) && $name eq 'source distribution') {
                open (DIST, '-|', "zcat $product | tar tf -");
@@ -150,6 +151,7 @@ open (INDEX, '>','index.html');
 print INDEX <<EOF;
 <html>
 <head>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link rel="stylesheet" href="build.css">
 </head>
 <body>
@@ -175,7 +177,17 @@ foreach my $p (@products) {
     print INDEX encode_entities ($p->{NAME}), ": " if defined ($p->{NAME});
     print INDEX "<a href=\"", encode_entities ($p->{HREF}), "\">";
     print INDEX encode_entities ($p->{PRODUCT});
-    print INDEX "</a></li>\n";
+    print INDEX "</a>\n";
+    if ($p->{PRODUCT} =~ /\.tar\.gz$/) {
+       my $sha = Digest::SHA->new(1);
+       $sha->addfile($p->{PRODUCT});
+       print INDEX "<br>sha1: ", $sha->hexdigest, "\n";
+
+       $sha = Digest::SHA->new(256);
+       $sha->addfile($p->{PRODUCT});
+       print INDEX "<br>sha256: ", $sha->hexdigest, "\n";
+    }
+    print INDEX "</li>\n";
 }
 print INDEX "</ul>\n";