diff options
Diffstat (limited to 'debian/helpers/getver.pl')
-rwxr-xr-x | debian/helpers/getver.pl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/debian/helpers/getver.pl b/debian/helpers/getver.pl new file mode 100755 index 0000000..27a87b4 --- /dev/null +++ b/debian/helpers/getver.pl @@ -0,0 +1,14 @@ +#!/usr/bin/perl + +# Extract upstream version from version in changelog. + +use warnings; +use strict; + +use Dpkg::Changelog::Parse; + +my $fields = changelog_parse(); +my $v = $fields->{Version}->version(); +$v =~ /^([0-9]+\.[0-9]+).*/ or die 'INVALID VERSION! (needs X.Y)'; + +printf("%s\n", $1); |