X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=build-aux%2Fannounce-gen;h=972b88146321b0997b4ab1fcfc99df07f2e1f514;hb=1c233a6b61e3aca04d0edd02ad31a276d35bfcf4;hp=677566559b9faa6fd15fd9db8d23061f6b9cf67f;hpb=c48f10715dd793d2f7c0dcecb622a3135539ab4f;p=gnulib.git diff --git a/build-aux/announce-gen b/build-aux/announce-gen index 677566559..972b88146 100755 --- a/build-aux/announce-gen +++ b/build-aux/announce-gen @@ -1,13 +1,13 @@ #!/usr/bin/perl -w # Generate a release announcement message. -my $VERSION = '2008-10-10 05:12'; # UTC +my $VERSION = '2009-09-11 09:50'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. -# Copyright (C) 2002-2008 Free Software Foundation, Inc. +# Copyright (C) 2002-2009 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -33,32 +33,8 @@ use POSIX qw(strftime); (my $ME = $0) =~ s|.*/||; -my %valid_release_types = map {$_ => 1} qw (alpha beta major); - -END -{ - # Nobody ever checks the status of print()s. That's okay, because - # if any do fail, we're guaranteed to get an indicator when we close() - # the filehandle. - # - # Close stdout now, and if there were no errors, return happy status. - # If stdout has already been closed by the script, though, do nothing. - defined fileno STDOUT - or return; - close STDOUT - and return; - - # Errors closing stdout. Indicate that, and hope stderr is OK. - warn "$ME: closing standard output: $!\n"; - - # Don't be so arrogant as to assume that we're the first END handler - # defined, and thus the last one invoked. There may be others yet - # to come. $? will be passed on to them, and to the final _exit(). - # - # If it isn't already an error, make it one (and if it _is_ an error, - # preserve the value: it might be important). - $? ||= 1; -} +my %valid_release_types = map {$_ => 1} qw (alpha beta stable); +my @archive_suffixes = ('tar.gz', 'tar.bz2', 'tar.lzma', 'tar.xz'); sub usage ($) { @@ -73,11 +49,10 @@ sub usage ($) my @types = sort keys %valid_release_types; print $STREAM < \@news_file, 'bootstrap-tools=s' => \$bootstrap_tools, 'gnulib-version=s' => \$gnulib_version, + 'print-checksums!' => \$print_checksums_p, + 'archive-suffix=s' => \@archive_suffixes, help => sub { usage 0 }, version => sub { print "$ME version $VERSION\n"; exit }, @@ -426,14 +405,14 @@ sub get_tool_versions ($$) and usage 1; my $my_distdir = "$package_name-$curr_version"; - my $tgz = "$my_distdir.tar.gz"; - my $tbz = "$my_distdir.tar.bz2"; - my $lzma = "$my_distdir.tar.lzma"; + my $xd = "$package_name-$prev_version-$curr_version.xdelta"; - my @tarballs = grep {-f $_} ($tgz, $tbz, $lzma); + my @candidates = map { "$my_distdir.$_" } @archive_suffixes; + my @tarballs = grep {-f $_} @candidates; + @tarballs - or die "$ME: none of $tgz, $tbz, or $lzma were found\n"; + or die "$ME: none of " . join(', ', @candidates) . " were found\n"; my @sizable = @tarballs; -f $xd and push @sizable, $xd; @@ -445,7 +424,7 @@ sub get_tool_versions ($$) # mail (or part of a diff), Gnus is not triggered. print < @@ -462,16 +441,16 @@ EOF print_locations ("GPG detached signatures[*]", @url_dir_list, %size, @sig_files); - print_checksums (@sizable); + $print_checksums_p + and print_checksums (@sizable); print <