diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-06-13 15:21:47 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-06-13 15:21:47 +0000 |
commit | fbc35fd95c230d9b7459db1cb88670938a16274d (patch) | |
tree | 98be78d206f2cec246fb9772e06beb9a578503d3 /mgaadv | |
parent | b84016d16a0d80b05177e2fbb233a0cc9ddcfcd3 (diff) | |
download | mgaadvisories-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-x | mgaadv | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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(); } |