From 5af1271ab553aa62a3ef995d173a45e1907d8bd2 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Thu, 11 Jul 2002 14:01:58 +0000 Subject: 3.7-3mdk --- urpmi.addmedia | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'urpmi.addmedia') diff --git a/urpmi.addmedia b/urpmi.addmedia index 3ef542e9..083b34f3 100755 --- a/urpmi.addmedia +++ b/urpmi.addmedia @@ -40,6 +40,10 @@ and [options] are from ") . _(" -f - force generation of hdlist files. ") . _(" --wget - use wget to retrieve distant files. ") . _(" --curl - use curl to retrieve distant files. +") . _(" --proxy - use specified HTTP proxy, the port number is assumed + to be 1080 by default (format is ). +") . _(" --proxy-user - specify user and password to use for proxy + authentication (format is ). ") . _(" --update - create an update medium. ") . _(" --distrib - automatically create all media from an installation medium. "); @@ -56,6 +60,18 @@ and [options] are from else { $options = { dir => $options, prefer => 'wget' } } 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} = $_; + next; + }; + /^--proxy-user$/ and do { + ($_ = shift @_) =~ /(.+):(.+)/, or die $usage; + $urpm->{proxy}->{user} = $1; + $urpm->{proxy}->{pwd} = $2; + next; + }; /^--distrib$/ and $options{distrib} = 1, next; /^--update$/ and $options{update} = 1, next; /^-/ and die $usage . _("\nunknown options '%s'\n", $_); -- cgit v1.2.1