summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gurpmi.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gurpmi.pm b/gurpmi.pm
index 1f58ba2f..4b972410 100644
--- a/gurpmi.pm
+++ b/gurpmi.pm
@@ -39,7 +39,18 @@ sub fatal { my $s = $_[0]; print STDERR "$s\n"; exit 1 }
sub parse_command_line {
my @all_rpms;
our %options;
- foreach (@ARGV) {
+ # Expand *.urpmi arguments
+ my @ARGV_expanded;
+ foreach my $a (@ARGV) {
+ if ($a =~ /\.urpmi$/) {
+ open my $fh, '<', $a or do { warn "Can't open $a: $!\n"; next };
+ push @ARGV_expanded, map { chomp; $_ } <$fh>;
+ close $fh;
+ } else {
+ push @ARGV_expanded, $a;
+ }
+ }
+ foreach (@ARGV_expanded) {
if (/^-/) {
$_ eq '--no-verify-rpm' and $options{'no-verify-rpm'} = 1;
/^--?[hv?]/ and usage();