diff options
author | Andy Wingo <wingo@pobox.com> | 2015-10-22 13:10:30 +0000 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2015-10-22 13:34:00 +0000 |
commit | 2d4da30fdefbcdb065d4b1f48f2a77d06f69e3c3 (patch) | |
tree | 3f50180297054aeecd0b478e5f7260366b304c71 /build-aux/announce-gen | |
parent | 139ef2d17c98488fc8e5444bf642699f2ad09e08 (diff) | |
download | guile-2d4da30fdefbcdb065d4b1f48f2a77d06f69e3c3.tar.gz |
Update Gnulib to v0.1-603-g1d16a7b
Diffstat (limited to 'build-aux/announce-gen')
-rwxr-xr-x | build-aux/announce-gen | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/build-aux/announce-gen b/build-aux/announce-gen index db9ed50a7..8a6edb5d4 100755 --- a/build-aux/announce-gen +++ b/build-aux/announce-gen @@ -3,13 +3,13 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' if 0; # Generate a release announcement message. -my $VERSION = '2012-06-08 06:53'; # UTC +my $VERSION = '2013-07-09 06:39'; # 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-2014 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 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 @@ -29,15 +29,18 @@ my $VERSION = '2012-06-08 06:53'; # UTC use strict; use Getopt::Long; -use Digest::MD5; -eval { require Digest::SHA; } - or eval 'use Digest::SHA1'; use POSIX qw(strftime); (my $ME = $0) =~ s|.*/||; my %valid_release_types = map {$_ => 1} qw (alpha beta stable); my @archive_suffixes = ('tar.gz', 'tar.bz2', 'tar.lzma', 'tar.xz'); +my %digest_classes = + ( + 'md5' => (eval { require Digest::MD5; } and 'Digest::MD5'), + 'sha1' => ((eval { require Digest::SHA; } and 'Digest::SHA') + or (eval { require Digest::SHA1; } and 'Digest::SHA1')) + ); my $srcdir = '.'; sub usage ($) @@ -157,15 +160,13 @@ sub print_checksums (@) foreach my $meth (qw (md5 sha1)) { + my $class = $digest_classes{$meth} or next; foreach my $f (@file) { open IN, '<', $f or die "$ME: $f: cannot open for reading: $!\n"; binmode IN; - my $dig = - ($meth eq 'md5' - ? Digest::MD5->new->addfile(*IN)->hexdigest - : Digest::SHA1->new->addfile(*IN)->hexdigest); + my $dig = $class->new->addfile(*IN)->hexdigest; close IN; print "$dig $f\n"; } @@ -416,14 +417,15 @@ sub get_tool_versions ($$) @url_dir_list or (warn "URL directory name(s) not specified\n"), $fail = 1; - my @tool_list = split ',', $bootstrap_tools; + my @tool_list = split ',', $bootstrap_tools + if $bootstrap_tools; grep (/^gnulib$/, @tool_list) ^ defined $gnulib_version and (warn "when specifying gnulib as a tool, you must also specify\n" . "--gnulib-version=V, where V is the result of running git describe\n" . "in the gnulib source directory.\n"), $fail = 1; - exists $valid_release_types{$release_type} + !$release_type || exists $valid_release_types{$release_type} or (warn "'$release_type': invalid release type\n"), $fail = 1; @ARGV |