summaryrefslogtreecommitdiffstats
path: root/urpmi.update
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-06-28 12:35:43 +0000
committerFrancois Pons <fpons@mandriva.com>2002-06-28 12:35:43 +0000
commitab18e550dddce9519cc42bfa1c3353066fc7b7f4 (patch)
tree71917427d42d4eb3b0c8f4449eb4d467477ea6e5 /urpmi.update
parentb67cae4683e58ced6b28721cba36e1f1aa2b83b7 (diff)
downloadurpmi-ab18e550dddce9519cc42bfa1c3353066fc7b7f4.tar
urpmi-ab18e550dddce9519cc42bfa1c3353066fc7b7f4.tar.gz
urpmi-ab18e550dddce9519cc42bfa1c3353066fc7b7f4.tar.bz2
urpmi-ab18e550dddce9519cc42bfa1c3353066fc7b7f4.tar.xz
urpmi-ab18e550dddce9519cc42bfa1c3353066fc7b7f4.zip
3.6-4mdk
Diffstat (limited to 'urpmi.update')
-rwxr-xr-xurpmi.update7
1 files changed, 5 insertions, 2 deletions
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] <name> ...
where <name> is a medium name to update.