aboutsummaryrefslogtreecommitdiffstats
path: root/mgaadv
diff options
context:
space:
mode:
Diffstat (limited to 'mgaadv')
-rwxr-xr-xmgaadv14
1 files changed, 14 insertions, 0 deletions
diff --git a/mgaadv b/mgaadv
index a2ad4de..216d052 100755
--- a/mgaadv
+++ b/mgaadv
@@ -42,6 +42,15 @@ $0 show [ID]
Show an advisory.
END
},
+ update => {
+ run => \&updateadv,
+ descr => 'Update the advisories database',
+ usage => <<END,
+$0 update
+
+Update the advisories database.
+END
+ },
usage => {
run => \&usage,
descr => 'Show usage informations for an action',
@@ -104,6 +113,11 @@ sub showadv {
MGA::Advisories::showadv(\%advdb, $adv);
}
+sub updateadv {
+ usageexit('usage', $_[0]) unless @_ == 1;
+ MGA::Advisories::download_advisories;
+}
+
if (@ARGV == 0 || !$actions{$ARGV[0]}) {
usageexit();
}