Commit f73bc734 authored by Bernhard Link's avatar Bernhard Link Committed by Guillem Jover

dpkg-buildflags: Coalesce --list and --dump option parsing

Signed-off-by: Bernhard Link's avatarBernhard R. Link <brlink@debian.org>
Signed-off-by: Guillem Jover's avatarGuillem Jover <guillem@debian.org>
parent 27c77418
......@@ -72,14 +72,10 @@ while (@ARGV) {
if defined($action);
my $type = $1 || "sh";
$action = "export-$type";
} elsif (m/^--dump$/) {
usageerr(_g("two commands specified: --%s and --%s"), "dump", $action)
if defined($action);
$action = "dump";
} elsif (m/^--list$/) {
usageerr(_g("two commands specified: --%s and --%s"), "list", $action)
} elsif (m/^--(list|dump)$/) {
usageerr(_g("two commands specified: --%s and --%s"), $1, $action)
if defined($action);
$action = "list";
$action = $1;
} elsif (m/^-(h|-help)$/) {
usage();
exit 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment