source: osm/applications/editors/josm/dist/getversions@ 12322

Last change on this file since 12322 was 10333, checked in by stoecker, 16 years ago

better version info, using plain perl now

  • Property svn:executable set to *
File size: 947 bytes
Line 
1#! /usr/bin/perl -w
2
3my $maxlength = 0;
4my @names = glob "*.jar";
5
6foreach my $plugin (@names)
7{
8 my $l = length($plugin);
9 $maxlength = $l if $l > $maxlength;
10}
11
12foreach my $plugin (@names)
13{
14 my $date = "";
15 my $version = "";
16 my $manifest = `unzip -c $plugin META-INF/MANIFEST.MF`;
17 if($manifest)
18 {
19 $date = $1 if $manifest =~ /Plugin-Date: ([^\r\n]+)/;
20 $version = $1 if $manifest =~ /Plugin-Version: ([^\r\n]+)/;
21 }
22 printf "%-${maxlength}s %28s %6s", $plugin,$date,$version;
23 my $svnfile = ".svn/text-base/$plugin.svn-base";
24 if(-f $svnfile && ($manifest = `unzip -c $svnfile META-INF/MANIFEST.MF`))
25 {
26 my $svndate = "";
27 my $svnversion = "";
28 $svndate = $1 if $manifest =~ /Plugin-Date: ([^\r\n]+)/;
29 $svnversion = $1 if $manifest =~ /Plugin-Version: ([^\r\n]+)/;
30 printf " SVN: %28s %6s%s", $svndate,$svnversion,
31 ($svndate ne $date || $svnversion ne $version) ? " changed" : "";
32 }
33 printf "\n";
34}
Note: See TracBrowser for help on using the repository browser.