diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2014-11-30 12:44:31 +0100 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2014-11-30 12:44:31 +0100 |
commit | 25d8b26294aaaa1ae6a6a6039243bc60ac10f9ee (patch) | |
tree | c76bee21a1ad937e5a0b0dac6151925e31705b94 /mgaadv | |
parent | 66cbe6d24b8f96bf53b3f6a546c89d69f70fccd6 (diff) | |
download | mgaadvisories-25d8b26294aaaa1ae6a6a6039243bc60ac10f9ee.tar mgaadvisories-25d8b26294aaaa1ae6a6a6039243bc60ac10f9ee.tar.gz mgaadvisories-25d8b26294aaaa1ae6a6a6039243bc60ac10f9ee.tar.bz2 mgaadvisories-25d8b26294aaaa1ae6a6a6039243bc60ac10f9ee.tar.xz mgaadvisories-25d8b26294aaaa1ae6a6a6039243bc60ac10f9ee.zip |
Add [name] argument to mgaadv to prefill the template
Diffstat (limited to 'mgaadv')
-rwxr-xr-x | mgaadv | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -69,10 +69,10 @@ END run => \&newadv, descr => 'Create a new advisory file', usage => <<END, -$0 new [type] [bugnum] +$0 new [type] [bugnum] [name] -Create a new advisory file. [type] should be security or bugfix and -[bugnum] is the bugzilla bug number. +Create a new advisory file. [type] should be security or bugfix, +[bugnum] is the bugzilla bug number and [name] is the package name. END }, nextid => { @@ -173,9 +173,9 @@ sub process { sub editor { $ENV{EDITOR} || $ENV{VISUAL} || '/usr/bin/editor' } sub newadv { - usageexit('usage', $_[0]) unless @_ == 3; - my ($new, $type, $bugnum) = @_; - my $file = MGA::Advisories::newadv($type, $bugnum); + usageexit('usage', $_[0]) unless @_ == 4; + my ($new, $type, $bugnum, $name) = @_; + my $file = MGA::Advisories::newadv($type, $bugnum, $name); if ($file) { system(editor, $file); } |