Ignore:
Timestamp:
2011-03-06T16:50:22+01:00 (14 years ago)
Author:
stoecker
Message:

update again to cleanup Launchpad state

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/i18n/launchpad.pl

    r25523 r25528  
    33use strict;
    44
     5my $count = 0;#11;
     6my $cleanall = 0;#1;
    57
    68if($#ARGV != 0)
     
    1921      my $a=$name;
    2022      $a =~ s/.*-//;
    21       system "mv -v $name po/$a" if -f "po/$a";
    22       # activate in case we need a "clean all upstream texts launchpad upload"
    23       # system "touch po/$a" if ! -f "po/$a";
     23      if(-f "po/$a")
     24      {
     25        system "mv -v $name po/$a";
     26      }
     27      elsif($cleanall)
     28      {
     29        local $/; undef $/;
     30        open FILE,"<",$name or die;
     31        my $x = <FILE>;
     32        close FILE;
     33        $x =~ s/\n\n.*$/\n/s;
     34        open FILE,">","po/$a" or die;
     35        print FILE $x;
     36        close FILE;
     37      }
    2438    }
    2539}
     
    2943mkdir "josm";
    3044system "cp po/*.po po/josm.pot josm";
    31 system "tar -czf launchpad_upload_josm_$outdate.tgz josm";
     45if(!$count)
     46{
     47  system "tar -cjf launchpad_upload_josm_$outdate.tar.bz2 josm";
     48}
     49else
     50{
     51  my @files = sort glob("josm/*.po");
     52  my $num = 1;
     53  while($#files >= 0)
     54  {
     55     my @f = splice(@files, 0, $count);
     56     system "tar -cjf launchpad_upload_josm_${outdate}_$num.tar.bz2 josm/josm.pot ".join(" ",@f);
     57     ++$num;
     58  }
     59}
    3260system "rm -rv josm new";
Note: See TracChangeset for help on using the changeset viewer.