From c9fdb6d4e5b72adba69f81692ee12c2e20366a85 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 26 Jan 2004 22:20:57 +0000 Subject: add downloader option in global config section --- urpmq | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'urpmq') diff --git a/urpmq b/urpmq index 4c96516c..d8dd1580 100755 --- a/urpmq +++ b/urpmq @@ -120,11 +120,8 @@ while (defined($_ = shift @ARGV)) { /^--root$/ and do { push @nextargv, \$query->{root}; next }; /^--use-distrib$/ and do { push @nextargv, \$query->{usedistrib}; next }; /^--parallel$/ and do { push @nextargv, \$query->{parallel}; next }; - /^--wget$/ and do { $urpm->{sync} = sub { my $options = shift @_; - if (ref($options)) { $options->{prefer} = 'wget' } - else { $options = { dir => $options, prefer => 'wget' } } - urpm::sync_webfetch($options, @_) }; next }; - /^--curl$/ and do { $urpm->{sync} = \&urpm::sync_webfetch; next }; + /^--wget$/ and do { $urpm->{options}{downloader} = 'wget'; next }; + /^--curl$/ and do { $urpm->{options}{downloader} = 'curl'; next }; /^--proxy$/ and do { my ($proxy, $port) = ($_ = shift @ARGV) =~ m,^(?:http://)?([^:]+(:\d+)?)/*$, or die N("bad proxy declaration on command line\n"); -- cgit v1.2.1