From fbc35fd95c230d9b7459db1cb88670938a16274d Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Thu, 13 Jun 2013 15:21:47 +0000 Subject: Add 'update' command to download new advisories db --- mgaadv | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mgaadv') diff --git a/mgaadv b/mgaadv index a2ad4de..216d052 100755 --- a/mgaadv +++ b/mgaadv @@ -40,6 +40,15 @@ END $0 show [ID] Show an advisory. +END + }, + update => { + run => \&updateadv, + descr => 'Update the advisories database', + usage => < { @@ -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(); } -- cgit v1.2.1