diff options
author | Francois Pons <fpons@mandriva.com> | 2002-07-11 14:01:58 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-07-11 14:01:58 +0000 |
commit | 5af1271ab553aa62a3ef995d173a45e1907d8bd2 (patch) | |
tree | ed4741d9b11c877cc893ae00f059b3d0a45db203 /urpmq | |
parent | 226d3fc89d5ae6c5c5c86394e86b4fe16740c271 (diff) | |
download | urpmi-5af1271ab553aa62a3ef995d173a45e1907d8bd2.tar urpmi-5af1271ab553aa62a3ef995d173a45e1907d8bd2.tar.gz urpmi-5af1271ab553aa62a3ef995d173a45e1907d8bd2.tar.bz2 urpmi-5af1271ab553aa62a3ef995d173a45e1907d8bd2.tar.xz urpmi-5af1271ab553aa62a3ef995d173a45e1907d8bd2.zip |
3.7-3mdk
Diffstat (limited to 'urpmq')
-rwxr-xr-x | urpmq | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -58,6 +58,12 @@ usage: stdout (root only). ") . _(" --sources - give all source packages before downloading (root only). ") . _(" --force - force invocation even if some packages do not exist. +") . _(" --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 <proxyhost[:port]>). +") . _(" --proxy-user - specify user and password to use for proxy + authentication (format is <user:password>). ") . "\n" . _(" names or rpm files given on command line are queried. ", $urpm::VERSION); exit(0); @@ -86,6 +92,18 @@ for (@ARGV) { else { $options = { dir => $options, prefer => 'wget' } } urpm::sync_webfetch($options, @_) }; next }; /^--curl$/ and do { $urpm->{sync} = \&urpm::sync_webfetch; next }; + /^--proxy$/ and do { + ($_ = shift @_) =~ m,^http://([^:]+)(:([\d]+)|[^:])$, or usage; + $_ .= ":1080" if /[^\d]/; + $urpm->{proxy}->{http_proxy} = $_; + next; + }; + /^--proxy-user$/ and do { + ($_ = shift @_) =~ /(.+):(.+)/, or usage; + $urpm->{proxy}->{user} = $1; + $urpm->{proxy}->{pwd} = $2; + next; + }; /^-(.*)$/ and do { foreach (split //, $1) { /[\?h]/ and do { usage; next }; /d/ and do { $query->{deps} = 1; next }; |