aboutsummaryrefslogtreecommitdiffstats
path: root/mgaadv
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-06-13 15:21:47 +0000
committerNicolas Vigier <boklm@mageia.org>2013-06-13 15:21:47 +0000
commitfbc35fd95c230d9b7459db1cb88670938a16274d (patch)
tree98be78d206f2cec246fb9772e06beb9a578503d3 /mgaadv
parentb84016d16a0d80b05177e2fbb233a0cc9ddcfcd3 (diff)
downloadmgaadvisories-fbc35fd95c230d9b7459db1cb88670938a16274d.tar
mgaadvisories-fbc35fd95c230d9b7459db1cb88670938a16274d.tar.gz
mgaadvisories-fbc35fd95c230d9b7459db1cb88670938a16274d.tar.bz2
mgaadvisories-fbc35fd95c230d9b7459db1cb88670938a16274d.tar.xz
mgaadvisories-fbc35fd95c230d9b7459db1cb88670938a16274d.zip
Add 'update' command to download new advisories db
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();
}