File: launchpad.pl

package info (click to toggle)
josm 0.0.svn3376-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 53,192 kB
  • ctags: 15,964
  • sloc: java: 109,690; xml: 7,599; perl: 821; makefile: 51; sh: 21
file content (30 lines) | stat: -rwxr-xr-x 615 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/perl -w

use strict;


if($#ARGV != 0)
{
    warn "URL not given." 
}
else
{
    mkdir "new";
    die "Could not change into new data dir." if !chdir "new";
    system "wget $ARGV[0]";
    system "tar -xf laun*";
    chdir "..";
    foreach my $name (split("\n", `find new -name "*.po"`))
    {
      my $a=$name;
      $a =~ s/.*-//;
      system "mv -v $name po/$a" if -f "po/$a";
    }
}
system "ant";
my $outdate = `date -u +"%Y-%m-%dT%H_%M_%S"`;
chomp $outdate;
mkdir "josm";
system "cp po/*.po po/josm.pot josm";
system "tar -czf launchpad_upload_josm_$outdate.tgz josm";
system "rm -rv josm new";