From e0c66ce6fd2a3ae3d452da60bd60ee1d1479a6b6 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 18 Jan 2008 23:30:16 +0000 Subject: [PATCH] Make the extraction of the version number from configure.ac more robust. --- gettext-tools/misc/ChangeLog | 5 +++++ gettext-tools/misc/autopoint.in | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gettext-tools/misc/ChangeLog b/gettext-tools/misc/ChangeLog index a6b80f272..10d5a91f3 100644 --- a/gettext-tools/misc/ChangeLog +++ b/gettext-tools/misc/ChangeLog @@ -1,3 +1,8 @@ +2008-01-18 Bruno Haible + + * autopoint.in (xver): Make its computation more robust. + Reported by Michael Bauschert . + 2008-01-18 Bruno Haible * autopoint.in: Fix line breaking in an error message. diff --git a/gettext-tools/misc/autopoint.in b/gettext-tools/misc/autopoint.in index 057a7c50d..4bcaabc2d 100644 --- a/gettext-tools/misc/autopoint.in +++ b/gettext-tools/misc/autopoint.in @@ -266,7 +266,9 @@ fi # Check whether the -V option and the version number in configure.in match. # At least one of the two must be given. If both are given, they must agree. -xver=`cat "$configure_in" | grep '^AM_GNU_GETTEXT_VERSION(' | sed -e 's/^AM_GNU_GETTEXT_VERSION(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q` +sed_extract_AM_GNU_GETTEXT_VERSION_argument='s/^AM_GNU_GETTEXT_VERSION(\([^()]*\)).*$/\1/' +sed_remove_outer_brackets='s/^\[\(.*\)\]$/\1/' +xver=`cat "$configure_in" | grep '^AM_GNU_GETTEXT_VERSION(' | sed -n -e "$sed_extract_AM_GNU_GETTEXT_VERSION_argument"p | sed -e "$sed_remove_outer_brackets" | sed -e 1q` if test -z "$xver" && test -f intl/VERSION; then xver=`cat intl/VERSION | LC_ALL=C sed -n -e 's/^.*gettext-\([-+_.0-9A-Za-z]*\).*$/\1/p'` fi -- 2.47.2