summaryrefslogtreecommitdiffstats
path: root/urpmi.addmedia
diff options
context:
space:
mode:
Diffstat (limited to 'urpmi.addmedia')
-rwxr-xr-xurpmi.addmedia7
1 files changed, 5 insertions, 2 deletions
diff --git a/urpmi.addmedia b/urpmi.addmedia
index 74c0019e..3ef542e9 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -51,8 +51,11 @@ and [options] are from
/^--?c/ and $options{noclean} = 0, next;
/^--?h/ and $options{probe_with_hdlist} = 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;
/^--distrib$/ and $options{distrib} = 1, next;
/^--update$/ and $options{update} = 1, next;
/^-/ and die $usage . _("\nunknown options '%s'\n", $_);