diff options
Diffstat (limited to 'mgaadv')
-rwxr-xr-x | mgaadv | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -5,6 +5,15 @@ use MGA::Advisories; use Template; my %actions = ( + list => { + run => \&listadv, + descr => 'List advisories', + usage => <<END, +$0 list + +Print the list of published advisories +END + }, mksite => { run => \&mksite, descr => 'Generates the advisories web site', @@ -71,6 +80,13 @@ sub newadv { } } +sub listadv { + usageexit('usage', $_[0]) unless @_ == 1; + my %advdb; + $advdb{advisories} = MGA::Advisories::get_advisories(); + MGA::Advisories::listadv(\%advdb); +} + if (@ARGV == 0 || !$actions{$ARGV[0]}) { usageexit(); } |