summaryrefslogtreecommitdiffstats
path: root/gurpmi.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-03 17:32:55 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-03 17:32:55 +0000
commite57338e203aa54d4f2dbab901783c755f97dc5c9 (patch)
tree416f19d5a21a80294abd778a5e93005127f8b075 /gurpmi.pm
parent2433828fdc1046ec853b633a41edc5afa03894a7 (diff)
downloadurpmi-e57338e203aa54d4f2dbab901783c755f97dc5c9.tar
urpmi-e57338e203aa54d4f2dbab901783c755f97dc5c9.tar.gz
urpmi-e57338e203aa54d4f2dbab901783c755f97dc5c9.tar.bz2
urpmi-e57338e203aa54d4f2dbab901783c755f97dc5c9.tar.xz
urpmi-e57338e203aa54d4f2dbab901783c755f97dc5c9.zip
Add --media and --searchmedia options to gurpmi
Diffstat (limited to 'gurpmi.pm')
-rw-r--r--gurpmi.pm12
1 files changed, 8 insertions, 4 deletions
diff --git a/gurpmi.pm b/gurpmi.pm
index b00bb600..0590412a 100644
--- a/gurpmi.pm
+++ b/gurpmi.pm
@@ -32,6 +32,8 @@ Usage :
Options :
--auto-select
--no-verify-rpm
+ --media media1,...
+ --searchmedia media1,...
USAGE
exit 0;
}
@@ -57,14 +59,16 @@ sub parse_command_line {
push @ARGV_expanded, $a;
}
}
+ my $nextopt;
foreach (@ARGV_expanded) {
+ if ($nextopt) { $options{$nextopt} = $_; undef $nextopt; next }
if (/^-/) {
- if ($_ eq '--no-verify-rpm') {
- $options{'no-verify-rpm'} = 1;
+ if (/^--(no-verify-rpm|auto-select)$/) {
+ $options{$1} = 1;
next;
}
- if ($_ eq '--auto-select') {
- $options{'auto-select'} = 1;
+ if (/^--(media|searchmedia)$/) {
+ $nextopt = $1;
next;
}
/^--?[hv?]/ and usage();