summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-09-20 00:59:58 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-09-20 00:59:58 +0000
commitad8fea39c3b9e890028d3f1a021ca65b1d38a996 (patch)
tree152d864f981e309062e80950aed8e15796230b5b
parentf0e29123966cde1240ca6d34a1b8179e83c8de1f (diff)
downloadurpmi-ad8fea39c3b9e890028d3f1a021ca65b1d38a996.tar
urpmi-ad8fea39c3b9e890028d3f1a021ca65b1d38a996.tar.gz
urpmi-ad8fea39c3b9e890028d3f1a021ca65b1d38a996.tar.bz2
urpmi-ad8fea39c3b9e890028d3f1a021ca65b1d38a996.tar.xz
urpmi-ad8fea39c3b9e890028d3f1a021ca65b1d38a996.zip
Add a "--" option to urpmi.removemedia.
-rwxr-xr-xurpmi.removemedia16
1 files changed, 10 insertions, 6 deletions
diff --git a/urpmi.removemedia b/urpmi.removemedia
index 4a2d9e25..601b60b4 100755
--- a/urpmi.removemedia
+++ b/urpmi.removemedia
@@ -30,13 +30,16 @@ sub main {
$options{noclean} = 1;
$options{strict_match} = 1;
$options{verbose} = 1;
+ my $options_end = 0;
foreach (@_) {
- /^--?a$/ and $options{all} = 1, next;
- /^--?c$/ and $options{noclean} = 0, next;
- /^--?y$/ and $options{strict_match} = 0, next;
- /^--?v$/ and $options{verbose} = 1, next;
- /^--?q$/ and $options{verbose} = 0, next;
- /^-/ and die N("usage: urpmi.removemedia [-a] <name> ...
+ $_ eq '--' and $options_end = 1, next;
+ unless ($options_end) {
+ /^--?a$/ and $options{all} = 1, next;
+ /^--?c$/ and $options{noclean} = 0, next;
+ /^--?y$/ and $options{strict_match} = 0, next;
+ /^--?v$/ and $options{verbose} = 1, next;
+ /^--?q$/ and $options{verbose} = 0, next;
+ /^-/ and die N("usage: urpmi.removemedia [-a] <name> ...
where <name> is a medium name to remove.
") . N(" --help - print this help message.
") . N(" -a - select all media.
@@ -45,6 +48,7 @@ where <name> is a medium name to remove.
") . N(" -q - quiet mode.
") . N(" -v - verbose mode.
") . (/^--?h(?:elp)$/ ? '' : N("\nunknown options '%s'\n", $_));
+ }
push @toremoves, $_;
}