From 2dc046b070fb751c2bba2b9352b117ac6e836cb7 Mon Sep 17 00:00:00 2001 From: Marco d'Itri Date: Sat, 13 Sep 2014 04:59:04 +0200 Subject: Update make_version_h.pl to support Debian binNMUs --- make_version_h.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'make_version_h.pl') diff --git a/make_version_h.pl b/make_version_h.pl index 9eef4a8..06c7841 100755 --- a/make_version_h.pl +++ b/make_version_h.pl @@ -2,17 +2,18 @@ use warnings; use strict; +use autodie; my $changelog = $ARGV[0] or die "Usage: $0 debian/changelog\n"; -open(my $fh, '<', $changelog) or die "open($changelog): $!"; +open(my $fh, '<', $changelog); my $line = <$fh>; -close($fh) or die "close($changelog): $!"; +close($fh); my ($ver) = $line =~ /^whois \s+ \( ( [^\)]+ ) \) \s+ \S+/x; die "Version number not found in $changelog!\n" if not $ver; -$ver =~ s/ ( ~bpo\d+\+\d+ | ~deb\d+.* | ubuntu\d+ | \+dyson\d+ ) $//x; +$ver =~ s/ ( ~bpo\d+\+\d+ | \+b\d+ | ~deb\d+.* | ubuntu\d+ | \+dyson\d+ ) $//x; # The version number must not deviate from this format or the -V option # to RIPE-like servers will break. If needed, update the previous regexp. -- cgit v1.2.3