aboutsummaryrefslogtreecommitdiffstats
path: root/mgaadv
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-11-24 19:36:52 +0000
committerColin Guthrie <colin@mageia.org>2014-11-25 10:30:51 +0000
commit62e6180b53eff8075f9c2dd8b359e972e190bc91 (patch)
treeb0e7e9396d6a219b272b8496b155dc3c361e8a5c /mgaadv
parent2592347f89b5303dfdc8a448d5a705b913b4043c (diff)
downloadmgaadvisories-62e6180b53eff8075f9c2dd8b359e972e190bc91.tar
mgaadvisories-62e6180b53eff8075f9c2dd8b359e972e190bc91.tar.gz
mgaadvisories-62e6180b53eff8075f9c2dd8b359e972e190bc91.tar.bz2
mgaadvisories-62e6180b53eff8075f9c2dd8b359e972e190bc91.tar.xz
mgaadvisories-62e6180b53eff8075f9c2dd8b359e972e190bc91.zip
Add a 'publishall' option to attempt to publish all pending advisories.
Diffstat (limited to 'mgaadv')
-rwxr-xr-xmgaadv14
1 files changed, 14 insertions, 0 deletions
diff --git a/mgaadv b/mgaadv
index 0a4df25..1840c2d 100755
--- a/mgaadv
+++ b/mgaadv
@@ -93,6 +93,15 @@ $0 publish [bugnum]
Assign a new ID to an advisory file.
END
},
+ 'publish-all' => {
+ run => \&publishall,
+ descr => 'Publish all pending advisories',
+ usage => <<END
+$0 publish-all
+
+Assign a new ID to all pending, validated advisories (subject to cross checks).
+END
+ },
show => {
run => \&showadv,
descr => 'Show an advisory',
@@ -189,6 +198,11 @@ sub publish {
MGA::Advisories::assign_id($_[1]);
}
+sub publishall {
+ usageexit('usage', $_[0]) unless @_ == 1;
+ MGA::Advisories::assign_ids();
+}
+
sub listadv {
shift;
my %advdb;