aboutsummaryrefslogtreecommitdiffstats
path: root/mgaadv
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-06-13 12:45:00 +0000
committerNicolas Vigier <boklm@mageia.org>2013-06-13 12:45:00 +0000
commit0268da9024bc8b59551929983c967f9c5aaf6b0c (patch)
tree380ff636d0edc8066c3ca35b75abbdd365e55409 /mgaadv
parent7aef72e3e486c3146c7b1e315c82b2a01de81552 (diff)
downloadmgaadvisories-0268da9024bc8b59551929983c967f9c5aaf6b0c.tar
mgaadvisories-0268da9024bc8b59551929983c967f9c5aaf6b0c.tar.gz
mgaadvisories-0268da9024bc8b59551929983c967f9c5aaf6b0c.tar.bz2
mgaadvisories-0268da9024bc8b59551929983c967f9c5aaf6b0c.tar.xz
mgaadvisories-0268da9024bc8b59551929983c967f9c5aaf6b0c.zip
Add 'show' command to show an advisory
Diffstat (limited to 'mgaadv')
-rwxr-xr-xmgaadv17
1 files changed, 17 insertions, 0 deletions
diff --git a/mgaadv b/mgaadv
index 4ea8b81..a2ad4de 100755
--- a/mgaadv
+++ b/mgaadv
@@ -33,6 +33,15 @@ 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 => <<END,
+$0 show [ID]
+
+Show an advisory.
+END
+ },
usage => {
run => \&usage,
descr => 'Show usage informations for an action',
@@ -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();
}