Changeset 782 in MondoRescue for trunk/tools/mkchangelog.pl


Ignore:
Timestamp:
Aug 12, 2006, 11:32:32 AM (18 years ago)
Author:
Bruno Cornec
Message:

merge -r763:781 $SVN_M/branches/stable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/mkchangelog.pl

    r729 r782  
    2323my $tmp = "";
    2424my $ver = "";
     25my $ver2 = "";
    2526my $date = "";
    2627
     
    5758    }
    5859}
    59 print "Using $chglog as input ChangeLog file for $pkg\n";
     60#print "Using $chglog as input ChangeLog file for $pkg\n";
    6061
    6162open(INPUT,"$chglog") || die "Unable to open $chglog (read)";
    6263open(OUTPUT,"> $outfile") || die "Unable to open $outfile (write)";
     64
    6365# Skip first 4 lines
    6466$tmp = <INPUT>;
     
    7375}
    7476
     77my $first=1;
     78
    7579# Handle each block separated by newline
    7680while (<INPUT>) {
    7781    ($ver, $date) = split(/ /);
     82    $ver =~ s/^v//;
    7883    chomp($date);
    7984    $date =~ s/\(([0-9-]+)\)/$1/;
     
    8388    #print "**$ndate**\n";
    8489    if ($dtype eq "rpm") {
    85         print OUTPUT "* $ndate Bruno Cornec <bruno\@mondorescue.org> VVV-RRR\n";
     90        if ($ver !~ /-/) {
     91            if ($first eq 1) {
     92                $ver2 = "$ver-$ENV{TAG}"."$ENV{suf}";
     93                $first=0;
     94            } else {
     95                $ver2 = "$ver-1"."$ENV{suf}";
     96            }
     97        } else {
     98            $ver2 = "$ver"."$ENV{suf}";
     99        }
     100        print OUTPUT "* $ndate Bruno Cornec <bruno\@mondorescue.org> $ver2\n";
    86101        print OUTPUT "- Updated to $ver\n";
    87102        }
Note: See TracChangeset for help on using the changeset viewer.