From ab18e550dddce9519cc42bfa1c3353066fc7b7f4 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Fri, 28 Jun 2002 12:35:43 +0000 Subject: 3.6-4mdk --- urpmi.update | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'urpmi.update') diff --git a/urpmi.update b/urpmi.update index eb36afac..1454d16a 100755 --- a/urpmi.update +++ b/urpmi.update @@ -35,8 +35,11 @@ sub main { /^--?c/ and $options{noclean} = 0, next; /^--?d/ and $options{depslist} = 1, next; /^--?f/ and ++$options{force}, next; - /^--wget/ and $urpm->{sync} = \&urpm::sync_wget, next; - /^--curl/ and $urpm->{sync} = \&urpm::sync_curl, 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; /^--?noa/ and next; #- default, keeped for compability. /^-/ and die _("usage: urpmi.update [options] ... where is a medium name to update. -- cgit v1.2.1