mirror of
https://github.com/rfc1036/whois.git
synced 2026-05-03 06:51:09 +00:00
Update make_version_h.pl to support Debian binNMUs
This commit is contained in:
parent
833af3d94a
commit
2dc046b070
@ -2,17 +2,18 @@
|
|||||||
|
|
||||||
use warnings;
|
use warnings;
|
||||||
use strict;
|
use strict;
|
||||||
|
use autodie;
|
||||||
|
|
||||||
my $changelog = $ARGV[0] or die "Usage: $0 debian/changelog\n";
|
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>;
|
my $line = <$fh>;
|
||||||
close($fh) or die "close($changelog): $!";
|
close($fh);
|
||||||
|
|
||||||
my ($ver) = $line =~ /^whois \s+ \( ( [^\)]+ ) \) \s+ \S+/x;
|
my ($ver) = $line =~ /^whois \s+ \( ( [^\)]+ ) \) \s+ \S+/x;
|
||||||
die "Version number not found in $changelog!\n" if not $ver;
|
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
|
# 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.
|
# to RIPE-like servers will break. If needed, update the previous regexp.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user