[10333] | 1 | #! /usr/bin/perl -w
|
---|
| 2 |
|
---|
[29437] | 3 | my $oldsvn = 0; # before 1.7
|
---|
[10333] | 4 | my $maxlength = 0;
|
---|
| 5 | my @names = glob "*.jar";
|
---|
| 6 |
|
---|
| 7 | foreach my $plugin (@names)
|
---|
| 8 | {
|
---|
| 9 | my $l = length($plugin);
|
---|
| 10 | $maxlength = $l if $l > $maxlength;
|
---|
| 11 | }
|
---|
| 12 |
|
---|
[29437] | 13 | system "svn -q export -r BASE . getrev" if !$oldsvn;
|
---|
[10333] | 14 | foreach my $plugin (@names)
|
---|
| 15 | {
|
---|
[35501] | 16 | next if $plugin =~ /-(javadoc|sources)\.jar$/;
|
---|
[10333] | 17 | my $date = "";
|
---|
| 18 | my $version = "";
|
---|
[13588] | 19 | my $mversion = "";
|
---|
[10333] | 20 | my $manifest = `unzip -c $plugin META-INF/MANIFEST.MF`;
|
---|
| 21 | if($manifest)
|
---|
| 22 | {
|
---|
| 23 | $date = $1 if $manifest =~ /Plugin-Date: ([^\r\n]+)/;
|
---|
| 24 | $version = $1 if $manifest =~ /Plugin-Version: ([^\r\n]+)/;
|
---|
[13588] | 25 | $mversion = $1 if $manifest =~ /Plugin-Mainversion: ([^\r\n]+)/;
|
---|
[10333] | 26 | }
|
---|
[32307] | 27 | printf "%-${maxlength}s %28s %10s (%5s)", $plugin,$date,$version,$mversion;
|
---|
[29437] | 28 | my $svnfile = $oldsvn ? ".svn/text-base/$plugin.svn-base" : "getrev/$plugin";
|
---|
[10333] | 29 | if(-f $svnfile && ($manifest = `unzip -c $svnfile META-INF/MANIFEST.MF`))
|
---|
| 30 | {
|
---|
| 31 | my $svndate = "";
|
---|
| 32 | my $svnversion = "";
|
---|
[18487] | 33 | my $svnmversion = "";
|
---|
[10333] | 34 | $svndate = $1 if $manifest =~ /Plugin-Date: ([^\r\n]+)/;
|
---|
| 35 | $svnversion = $1 if $manifest =~ /Plugin-Version: ([^\r\n]+)/;
|
---|
[18487] | 36 | $svnmversion = $1 if $manifest =~ /Plugin-Mainversion: ([^\r\n]+)/;
|
---|
[26300] | 37 | my $changed = ($svndate ne $date || $svnversion ne $version);
|
---|
[26512] | 38 | my $changedm = $svnmversion ne $mversion;
|
---|
[32307] | 39 | printf " SVN: %28s %10s (%5s)%s%s", $svndate,$svnversion,$svnmversion,
|
---|
[26512] | 40 | $changed ? " changed" : "", $changedm ? " main" : "";
|
---|
[26615] | 41 | `svn revert $plugin` if !$changed && !$changedm;
|
---|
[10333] | 42 | }
|
---|
| 43 | printf "\n";
|
---|
| 44 | }
|
---|
[29437] | 45 | system "rm -rf getrev" if !$oldsvn;
|
---|