From 0268da9024bc8b59551929983c967f9c5aaf6b0c Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Thu, 13 Jun 2013 12:45:00 +0000 Subject: Add 'show' command to show an advisory --- mgaadv | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'mgaadv') diff --git a/mgaadv b/mgaadv index 4ea8b81..a2ad4de 100755 --- a/mgaadv +++ b/mgaadv @@ -31,6 +31,15 @@ $0 new [type] [bugnum] Create a new advisory file. [type] should be security or bugfix and [bugnum] is the bugzilla bug number. +END + }, + show => { + run => \&showadv, + descr => 'Show an advisory', + usage => < { @@ -87,6 +96,14 @@ sub listadv { MGA::Advisories::listadv(\%advdb); } +sub showadv { + usageexit('usage', $_[0]) unless @_ == 2; + my $adv = $_[1]; + my %advdb; + $advdb{advisories} = MGA::Advisories::get_advisories(); + MGA::Advisories::showadv(\%advdb, $adv); +} + if (@ARGV == 0 || !$actions{$ARGV[0]}) { usageexit(); } -- cgit v1.2.1