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 --- urpmq | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'urpmq') diff --git a/urpmq b/urpmq index 18c45574..2addd573 100755 --- a/urpmq +++ b/urpmq @@ -81,8 +81,11 @@ for (@ARGV) { /^--sources$/ and do { $query->{sources} = 1; next }; /^--force$/ and do { $query->{force} = 1; next }; /^--root$/ and do { push @nextargv, \$query->{root}; next }; - /^--wget$/ and do { $urpm->{sync} = \&urpm::sync_wget; next }; - /^--curl$/ and do { $urpm->{sync} = \&urpm::sync_curl; 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 }; /^-(.*)$/ and do { foreach (split //, $1) { /[\?h]/ and do { usage; next }; /d/ and do { $query->{deps} = 1; next }; -- cgit v1.2.1