diff options
-rw-r--r-- | Rpmdrake/init.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Rpmdrake/init.pm b/Rpmdrake/init.pm index d1a5c290..6060ee60 100644 --- a/Rpmdrake/init.pm +++ b/Rpmdrake/init.pm @@ -95,14 +95,17 @@ if ($collation_locale) { my $version = 1; our %rpmdrake_options; + +my $i; foreach (@ARGV) { + $i++; /^-?-(\S+)$/ or next; my $val = $1; if ($val =~ /=/) { my ($name, $values) = split /=/, $val; my @values = split /,/, $values; $rpmdrake_options{$name} = \@values if @values; - shift @ARGV + splice @ARGV, $i-1, 1; } else { if ($val eq 'version') { print "$0 $version\n"; |