From: Andy Wingo Date: Sat, 9 Feb 2002 19:25:47 +0000 (+0000) Subject: fix numeric comparisons (sort of, it now views 1.4.2 the same as 1.4.2a) require... X-Git-Tag: BRANCH-EVENTS2-ROOT~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b963ea0e7bd5804a3b0940143d33441f52c55a9d;p=platform%2Fupstream%2Fgst-common.git fix numeric comparisons (sort of, it now views 1.4.2 the same as 1.4.2a) require a fresh gstreamer (ie, glib2-only) f... Original commit message from CVS: * fix numeric comparisons (sort of, it now views 1.4.2 the same as 1.4.2a) * require a fresh gstreamer (ie, glib2-only) for the player --- diff --git a/gst-autogen.sh b/gst-autogen.sh index 1f4e171..8b99463 100644 --- a/gst-autogen.sh +++ b/gst-autogen.sh @@ -47,9 +47,11 @@ version_check () # the following line is carefully crafted sed magic pkg_version=`$PACKAGE --version|head -n 1|sed 's/^[a-zA-z\.\ ()]*//;s/ .*$//'` debug "pkg_version $pkg_version" - pkg_major=`echo $pkg_version | cut -d. -f1` - pkg_minor=`echo $pkg_version | cut -d. -f2` - pkg_micro=`echo $pkg_version | cut -d. -f3` + # remove any non-digit characters from the version numbers to permit numeric + # comparison + pkg_major=`echo $pkg_version | cut -d. -f1 | tr -d -c [:digit:]` + pkg_minor=`echo $pkg_version | cut -d. -f2 | tr -d -c [:digit:]` + pkg_micro=`echo $pkg_version | cut -d. -f3 | tr -d -c [:digit:]` test -z "$pkg_minor" && pkg_minor=0 test -z "$pkg_micro" && pkg_micro=0