Contents of /branches/ports/maemo/debian/parse-changelog

Parent Directory Parent Directory | Revision Log Revision Log


Revision 63 - (show annotations)
Sun Feb 8 22:52:48 2009 UTC (15 years, 2 months ago) by achadwick
File size: 574 byte(s)
Update from trunk; make it build properly with the new stuff.
1 #!/usr/bin/perl
2
3 $CHANGELOG = 'debian/changelog';
4
5 ($what, $trunkv) = (@ARGV);
6 defined($what) && defined($trunkv) or die "usage: $0 WHAT TRUNK_VERSION\n";
7 $trunkv_re = quotemeta($trunkv);
8 open(CL, '<', $CHANGELOG) || die "open($CHANGELOG) failed: $!\n";
9 while (<CL>) {
10 m{\((.*?)\b$trunkv_re\b(.*?)\)} or next;
11 ($prefix, $suffix) = ($1, $2);
12 last;
13 }
14 close CL;
15 if (! (defined($suffix) || defined($prefix))) {
16 die "error: $CHANGELOG does not list trunk version $trunkv\n";
17 }
18 if ($what eq 'prefix') {
19 print $prefix, "\n";
20 }
21 else {
22 print $suffix, "\n";
23 }

Properties

Name Value
svn:executable *