Lars Wirzenius wrote:
> > -p does enable this for some protocols (at least ftp, I think http as
> > well).
> 
> I don't seem to get any visible difference for http with the -p option.
> Would it be hard to add it to http?

Oh, I guess it's supported for ftp and rsync. This patch seems all that
would be needed for http. I haven't tested it, ENOBANDWIDTH.

diff --git a/debmirror b/debmirror
index ff4bd08..5b4e931 100755
--- a/debmirror
+++ b/debmirror
@@ -800,6 +800,7 @@ sub init_connection {
     $ua = LWP::UserAgent->new(keep_alive => 1);
     $ua->proxy('http', $ENV{http_proxy}) if $ENV{http_proxy};
     $ua->proxy('http', $proxy) if $proxy;
+    $ua->show_progress($progress);
     return;
   };
 
@@ -1507,7 +1508,8 @@ sub http_get {
   my $ret=1;
 
   print "$url => " if ($debug);
-  print_percent "Getting: $file... " if $progress or $verbose;
+  print_percent "Getting: $file" if $progress or $verbose;
+  print $progress ? "\t #" : "... ";
   if (! $do_dry_run) {
     unlink($file) if (-f $file);
     $ret = $ua->mirror($url, $file);

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to