Przeglądaj źródła

dpkg-parsechangelog: Unify -S option parsing with other short options

Expect the value for short options contiguous to the option itself,
instead of diverging and accepting it only as the next argument.
Guillem Jover 13 lat temu
rodzic
commit
a864541808
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      scripts/dpkg-parsechangelog.pl

+ 3 - 1
scripts/dpkg-parsechangelog.pl

@@ -83,7 +83,9 @@ while (@ARGV) {
 	$options{changelogformat} = $1;
 	$options{changelogformat} = $1;
     } elsif (m/^-l(.+)$/) {
     } elsif (m/^-l(.+)$/) {
 	$options{file} = $1;
 	$options{file} = $1;
-    } elsif (m/^-(?:S|-show-field)(?:=(.+))?$/) {
+    } elsif (m/^-S(.+)$/) {
+	$fieldname = $1;
+    } elsif (m/^--show-field(?:=(.+))?$/) {
 	$fieldname = $1 // shift(@ARGV);
 	$fieldname = $1 // shift(@ARGV);
     } elsif (m/^--$/) {
     } elsif (m/^--$/) {
 	last;
 	last;