summaryrefslogtreecommitdiffstats
path: root/urpmi.update
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-07-16 14:08:22 +0000
committerFrancois Pons <fpons@mandriva.com>2002-07-16 14:08:22 +0000
commit2cdbfcaf36c3561381a440ca84f2579ce0092776 (patch)
tree784e1a0785b07933f55971ef98979eb7d0cac6ce /urpmi.update
parenta5e21163c70a7a63e1df62871af8a5facae20a0a (diff)
downloadurpmi-2cdbfcaf36c3561381a440ca84f2579ce0092776.tar
urpmi-2cdbfcaf36c3561381a440ca84f2579ce0092776.tar.gz
urpmi-2cdbfcaf36c3561381a440ca84f2579ce0092776.tar.bz2
urpmi-2cdbfcaf36c3561381a440ca84f2579ce0092776.tar.xz
urpmi-2cdbfcaf36c3561381a440ca84f2579ce0092776.zip
3.7-5mdk
Diffstat (limited to 'urpmi.update')
-rwxr-xr-xurpmi.update12
1 files changed, 7 insertions, 5 deletions
diff --git a/urpmi.update b/urpmi.update
index 7560bd9c..4a516824 100755
--- a/urpmi.update
+++ b/urpmi.update
@@ -30,7 +30,7 @@ sub main {
$options{force} = 0;
$options{noclean} = 1;
- foreach (@_) {
+ while ($_ = shift @_) {
/^--?a/ and $options{all} = 1, next;
/^--?c/ and $options{noclean} = 0, next;
/^--?d/ and $options{depslist} = 1, next;
@@ -41,13 +41,15 @@ sub main {
urpm::sync_webfetch($options, @_) }, next;
/^--curl/ and $urpm->{sync} = \&urpm::sync_webfetch, next;
/^--proxy$/ and do {
- ($_ = shift @_) =~ m,^http://([^:]+)(:([\d]+)|[^:])$, or die $usage;
- $_ .= ":1080" if /[^\d]/;
- $urpm->{proxy}->{http_proxy} = $_;
+ my ($proxy, $port) = ($_ = shift @_) =~ m,^(http://[^:]+(:\d+)?)/*$, or
+ die _("bad proxy declaration on command line\n");
+ $proxy .= ":1080" unless $port;
+ $urpm->{proxy}{http_proxy} = $proxy;
next;
};
/^--proxy-user$/ and do {
- ($_ = shift @_) =~ /(.+):(.+)/, or die $usage;
+ ($_ = shift @_) =~ /(.+):(.+)/, or
+ die _("bad proxy declaration on command line\n");
$urpm->{proxy}->{user} = $1;
$urpm->{proxy}->{pwd} = $2;
next;