diff options
-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> |