diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2017-06-20 22:05:08 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2017-06-20 22:05:08 +0300 |
commit | 463c81abcc6e1adc4463cb9d6f272cf23dbf29c2 (patch) | |
tree | 8422976fbc8b0f0b2ddf9c287fac41d44a543a12 /debian/upstream-version | |
download | emacs25-debian.tar.gz |
Imported emacs25 25.1+1-4debian/25.1+1-4debian
Diffstat (limited to 'debian/upstream-version')
-rwxr-xr-x | debian/upstream-version | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/upstream-version b/debian/upstream-version new file mode 100755 index 0000000..a6dd627 --- /dev/null +++ b/debian/upstream-version @@ -0,0 +1,22 @@ +#!/usr/bin/perl -w + +use strict; +use English; + +open(my $config_file, '<', 'configure.ac') + or die "cannot open configure.ac: $!"; + +my $version = ''; +my $found_init = 0; +while (<$config_file>) +{ + if(/^AC_INIT\(GNU Emacs,\s*(\d+\.\d+(\.\d+)?)\s*\,.*/o) + { + $found_init and die 'found duplicate AC_INIT() in configure.ac'; + $version = $1; + $found_init = 1; + } +} + +$found_init or die 'no AC_INIT() found in configure.ac'; +print "$version\n"; |