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 --- urpmi.addmedia | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'urpmi.addmedia') diff --git a/urpmi.addmedia b/urpmi.addmedia index caecc345..5e0f3f38 100755 --- a/urpmi.addmedia +++ b/urpmi.addmedia @@ -90,11 +90,8 @@ and [options] are from /^--?h$/ and next; /^--?f$/ and ++$options{force}, next; /^--?z$/ and ++$options{compress}, next; - /^--wget$/ and $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 $urpm->{sync} = \&urpm::sync_webfetch, next; + /^--wget$/ and $urpm->{options}{downloader} = 'wget', next; + /^--curl$/ and $urpm->{options}{downloader} = 'curl', next; /^--limit-rate$/ and do { $options{limit_rate} = shift @_; next }; /^--proxy$/ and do { my ($proxy, $port) = ($_ = shift @_) =~ m,^(?:http://)?([^:]+(:\d+)?)/*$, or -- cgit v1.2.1