]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Make the extraction of the version number from configure.ac more robust.
authorBruno Haible <bruno@clisp.org>
Fri, 18 Jan 2008 23:30:16 +0000 (23:30 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:15:37 +0000 (12:15 +0200)
gettext-tools/misc/ChangeLog
gettext-tools/misc/autopoint.in

index a6b80f2721eda8838e3d2f9e1e67ae1c01c1342e..10d5a91f3dc5ddf687c8d214245bebf1a80cdddb 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-18  Bruno Haible  <bruno@clisp.org>
+
+       * autopoint.in (xver): Make its computation more robust.
+       Reported by Michael Bauschert <Michael.Bauschert@de.ibm.com>.
+
 2008-01-18  Bruno Haible  <bruno@clisp.org>
 
        * autopoint.in: Fix line breaking in an error message.
index 057a7c50d717b5e0dd7fd92b6697194987b07082..4bcaabc2d078c1ef64b97004dd00230d3cec419f 100644 (file)
@@ -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