]> git.deb.at Git - deb/packages.git/blobdiff - bin/parse-contents
Update all .po and .pot files
[deb/packages.git] / bin / parse-contents
index 414dc8ac0a623c1f11e04154423881f033478cc7..ef5c09ce2b4645395371392f5f3a732dd913cae6 100755 (executable)
@@ -82,13 +82,16 @@ for my $suite (@suites) {
                
                open CONT, "zcat $filename|$what"
                    or die $!;
-               while (<CONT>) {last if /^FILE/mo;}
-               open CONT, "zcat $filename|$what" if eof(CONT);
+               while (<CONT>) { last if /^FILE/mo; }
+               if (eof(CONT)) { # no header found
+                   close CONT; # explicit close to reset $.
+                   open CONT, "zcat $filename|$what";
+               }
                while (<CONT>) {
                    my $data = "";
                    my %data = ();
                    chomp;
-                   print "Doing line ".($./1000)."k (out of approx 1.5M)\n" if $. % 250000 == 0;
+                   print "Doing line ".($./1000)."k (out of approx 2.0M)\n" if $. % 250000 == 0;
                    /^(.+?)\s+(\S+)$/o;
                    my ($file, $value) = ($1, $2);
                    $value =~ s#[^,/]+/##og;
@@ -159,7 +162,7 @@ for my $suite (@suites) {
     my $lastpath = my $lastcasepath = my $lastfile = "";
     my %matches = ();
     while (<MERGED>) {
-       print "Doing line ".($./1000000)."M (out of approx. 16M)\n"
+       print "Doing line ".($./1000000)."M (out of approx. 20M)\n"
            if $. % 1000000 == 0;
        chomp;
        my @line = split /\0/o, $_;