#
# Created by Damien Carbery, 25 April 2005.
use strict;
use POSIX; # For strftime.
# Display usage information.
sub Usage
{
print << "END_OF_USAGE_INFO";
exit 1; # Indicate an error.
}
# ####################################
# Main program.
# ####################################
# Display usage if no arguments.
my $DisplayHelp = 0;
my $BuildNum;
my $Email = 'dermot.mccluskey@sun.com';
# ############################
# Begin command line parsing.
# ############################
#Getopt::Long::Configure( 'pass_through' ); # Ignore unknown options.
Usage if ( $DisplayHelp );
# List of spec files to update.
my @specfiles = qw / apoc.spec evolution.spec gnome-spell.spec gtkhtml.spec hydrogen.spec libgal.spec libsoup.spec mozilla.spec oxygen2.spec /;
{
# Ensure all the specified files are present, quitting if any aren't.
my $MissingFiles = 0;
{
if ( ! -r $file )
{
}
}
}
# Change t_suffix and Release data and add %changelog entry for each file.
{
{
{
while ( <IN> )
{
{
}
{
}
elsif ( /^%changelog$/ )
{
print OUT;
print OUT '* ', strftime("%a %b %d %Y",localtime), " - $Email\n- Bump source tarball to build $BuildNum.\n\n";
}
else
{
print OUT;
}
}
}
}
else
{
}
}
# Update ChangeLog too, putting info at the top of the file.
{
{
print OUT "\t* ", join( ' ', @specfiles[0..4] ), "\n\t", join( ' ', @specfiles[5..$#specfiles] ), ":\n\t* Bump source tarballs to build $BuildNum.\n\n";
# Just pass-through the rest of the lines.
}
print "ChangeLog - done\n";
}
print "\nUse 'cvs diff' to verify changes.\nTo commit changes:\n cvs commit -m \"Bump source tarballs for Mozilla/Evolution/APOC\"\n";