summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gurpmi.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/gurpmi.pm b/gurpmi.pm
index 6c670e87..16a369c2 100644
--- a/gurpmi.pm
+++ b/gurpmi.pm
@@ -75,11 +75,12 @@ sub parse_command_line {
/^--?[hv?]/ and usage();
fatal(N("Unknown option %s", $_));
}
- if (/^[-a-zA-Z0-9_+]+\z/) { # is this an rpm name ?
- push @names, $_;
- } else { # assume it's a filename
- push @all_rpms, $_;
+ if (-f) {
+ push @all_rpms, $_
+ } else {
+ push @names, $_
}
+
}
$options{'auto-select'} || @all_rpms + @names
or fatal(N("No packages specified"));