source: soft/build_system/build_system/upload/robot/trunk/ch @ 1

Last change on this file since 1 was 1, checked in by fasma, 13 years ago

Initial Import from Mandriva's soft revision 224062 and package revision 45733

File size: 639 bytes
Line 
1#!/usr/bin/perl
2## Chmouel Boudjnah <chmouel@mandriva.com>
3## Give the last changelog with the -m option give the last maintenner.
4
5my ($main, $m);
6
7if ($ARGV[0] =~ "^-m") {$m++; shift;}
8
9$f = shift or die "Give me a fuel for my aeroplane\n";
10open(F,"LC_ALL=C rpm -qpi --changelog $f|") or die "can't open $f";
11
12while (<F>) {
13  if ($main) {last if /^\*\s+\w+\s+\w+\s+\d+\s+\d+\s+.*\@.*>/; push @CHANGELOG, $_ ;}
14  if (/^\*\s+\w+\s+\w+\s+\d+\s+\d+\s+(.*\@.*>)/) { $main = $1; push @CHANGELOG, $_ ;}
15}
16
17if ($m) { $main ? print "$main\n" : print "No adress found\n"} else 
18  { @CHANGELOG ? print @CHANGELOG : print "No Changelog found\n" };
19
Note: See TracBrowser for help on using the repository browser.