changeset 10446:904d03bfccce

[gaim-migrate @ 11711] Don't be quite so generous in assumptions about what sed can do committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Wed, 29 Dec 2004 20:01:48 +0000
parents 958a4cbd2ef5
children 6feef0a9098a
files setup-gettext
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/setup-gettext	Wed Dec 29 15:31:29 2004 +0000
+++ b/setup-gettext	Wed Dec 29 20:01:48 2004 +0000
@@ -26,10 +26,10 @@
 VERBOSE=0
 
 parse_gettext_version() {
-	GETTEXT_VERSION=`$GETTEXT_TOOL --version | sed -n 's/^.*\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\).*$/\1.\2.\3/p'`
-	GETTEXT_MAJOR_VERSION=`echo $GETTEXT_VERSION | sed -n 's/^\([0-9]\+\).*/\1/p'`
-	GETTEXT_MINOR_VERSION=`echo $GETTEXT_VERSION | sed -n 's/^[0-9]\+\.\([0-9]\+\).*/\1/p'`
-	GETTEXT_MICRO_VERSION=`echo $GETTEXT_VERSION | sed -n 's/^[0-9]\+\.[0-9]\+\.\([0-9]\+\).*/\1/p'`
+	GETTEXT_VERSION=`$GETTEXT_TOOL --version | sed -n 's/^.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/\1.\2.\3/p'`
+	GETTEXT_MAJOR_VERSION=`echo $GETTEXT_VERSION | cut -d. -f1`
+	GETTEXT_MINOR_VERSION=`echo $GETTEXT_VERSION | cut -d. -f2`
+	GETTEXT_MICRO_VERSION=`echo $GETTEXT_VERSION | cut -d. -f3`
 }
 
 find_gettext() {