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

Last change on this file since 26685 was 26615, checked in by stoecker, 13 years ago

updated

  • Property svn:executable set to *
File size: 1.3 KB
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 $mversion = "";
17 my $manifest = `unzip -c $plugin META-INF/MANIFEST.MF`;
18 if($manifest)
19 {
20 $date = $1 if $manifest =~ /Plugin-Date: ([^\r\n]+)/;
21 $version = $1 if $manifest =~ /Plugin-Version: ([^\r\n]+)/;
22 $mversion = $1 if $manifest =~ /Plugin-Mainversion: ([^\r\n]+)/;
23 }
24 printf "%-${maxlength}s %28s %6s (%4s)", $plugin,$date,$version,$mversion;
25 my $svnfile = ".svn/text-base/$plugin.svn-base";
26 if(-f $svnfile && ($manifest = `unzip -c $svnfile META-INF/MANIFEST.MF`))
27 {
28 my $svndate = "";
29 my $svnversion = "";
30 my $svnmversion = "";
31 $svndate = $1 if $manifest =~ /Plugin-Date: ([^\r\n]+)/;
32 $svnversion = $1 if $manifest =~ /Plugin-Version: ([^\r\n]+)/;
33 $svnmversion = $1 if $manifest =~ /Plugin-Mainversion: ([^\r\n]+)/;
34 my $changed = ($svndate ne $date || $svnversion ne $version);
35 my $changedm = $svnmversion ne $mversion;
36 printf " SVN: %28s %6s (%4s)%s%s", $svndate,$svnversion,$svnmversion,
37 $changed ? " changed" : "", $changedm ? " main" : "";
38 `svn revert $plugin` if !$changed && !$changedm;
39 }
40 printf "\n";
41}
Note: See TracBrowser for help on using the repository browser.