aboutsummaryrefslogtreecommitdiffstats
path: root/mgaadv
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2014-11-30 12:44:31 +0100
committerRémi Verschelde <remi@verschelde.fr>2014-11-30 12:44:31 +0100
commit25d8b26294aaaa1ae6a6a6039243bc60ac10f9ee (patch)
treec76bee21a1ad937e5a0b0dac6151925e31705b94 /mgaadv
parent66cbe6d24b8f96bf53b3f6a546c89d69f70fccd6 (diff)
downloadmgaadvisories-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-xmgaadv12
1 files changed, 6 insertions, 6 deletions
diff --git a/mgaadv b/mgaadv
index 1840c2d..ca519b0 100755
--- a/mgaadv
+++ b/mgaadv
@@ -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);
}