diff options
author | John McQuah <jmcquah@disroot.org> | 2022-02-12 14:31:52 +0100 |
---|---|---|
committer | Juergen Daubert <jue@jue.li> | 2022-02-12 14:31:52 +0100 |
commit | 3ea64833ee045309080b2232fb2753c52538398f (patch) | |
tree | db2d7a23997ce3517c26b14336d17680efa5a168 | |
parent | 5db0bb84891807585d88ef630e3edcffce753025 (diff) | |
download | prt-utils-3ea64833ee045309080b2232fb2753c52538398f.tar.gz prt-utils-3ea64833ee045309080b2232fb2753c52538398f.tar.xz |
portspage: augment portspage with the ability to find and print the signify public key
-rwxr-xr-x | portspage | 32 |
1 files changed, 28 insertions, 4 deletions
@@ -1,16 +1,18 @@ #!/usr/bin/perl -w -our $version = "1.0.4"; +our $version = "1.0.5"; ######################################################################## # -# portspage (http://www.karsikkopuu.net/crux/scripts/) +# portspage # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # This is a script for generating CRUX port listings. # Distributed under the terms of the GPL license. -# Report bugs and suggestions to <jukka@karsikkopuu.net>. +# Report bugs and suggestions to jmcquah at disroot dot org. # # Changelog: +# 1.0.5 +# - Added a table row containing the signify public key # 1.0.4 # - Added --date-from-pkgfile (patch from Mikhail Kolesnik) # 1.0.3 @@ -23,6 +25,7 @@ our $version = "1.0.4"; ######################################################################## use strict; +use Cwd qw(cwd getcwd); our %options = ( @@ -229,7 +232,28 @@ EOH close(FILE); } + + + print " <table width=\"100%\" cellspacing=\"0\">\n"; + my $CWD = getcwd; + my @repopath = split /\//, $CWD; + my $repo = $repopath[$#repopath]; + my $pubkey = "/etc/ports/".$repo.".pub"; + if (-e $pubkey) { + open(KH, $pubkey) or die "Couldn't read from public key!"; + while (my $line = <KH>) { + chomp $line; + if ($line =~ "untrusted comment") { + } + else { + print " <tr class=\"header\"><td colspan=\"4\">\n"; + print " <strong>Signify public key:</strong> $line\n"; + print " </td></tr>\n"; + } + } + close(KH); + } print " <tr class=\"header\"><td><b>Port</b></td><td><b>Version</b></td><td><b>Description</b></td>"; if ($options{timestamp_accuracy} > 0) { @@ -293,7 +317,7 @@ EOH close(FILE); } - print " <p><i>Generated by <a href=\"http://www.karsikkopuu.net/crux/scripts/\">portspage</a> $version on " . isotime() . ".</i></p>\n"; + print " <p><i>Generated by portspage $version on " . isotime() . ".</i></p>\n"; print <<EOH; </body> |