summaryrefslogtreecommitdiff
path: root/gst-autogen.sh
diff options
context:
space:
mode:
authorJan Schmidt <jan.schmidt@sun.com>2009-06-26 13:16:05 +0100
committerJan Schmidt <jan.schmidt@sun.com>2009-06-26 13:16:05 +0100
commit5845b632c99d8f0ab863bd955a9568d7937108f8 (patch)
tree2cac6fc3f9726baf31be776531ed3b0a8cf9c0c3 /gst-autogen.sh
parentf810030e4692aa43ae84f6649730fe25558a9738 (diff)
downloadgstreamer-common-5845b632c99d8f0ab863bd955a9568d7937108f8.tar.gz
gst-autogen.sh: Substitute punctuation in variable names. Use printf
Replace the punctuation (-,.) in variable names with underscores, so that checks for binaries with names like 'automake-1.10' can succeed. Use printf instead of 'echo -n' as it's apparently more portable.
Diffstat (limited to 'gst-autogen.sh')
-rw-r--r--gst-autogen.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst-autogen.sh b/gst-autogen.sh
index a155c1b..f05e021 100644
--- a/gst-autogen.sh
+++ b/gst-autogen.sh
@@ -28,7 +28,7 @@ version_get ()
# arg 2: (uppercased) variable name prefix
{
COMMAND=$1
- VARPREFIX=$2
+ VARPREFIX=`echo $2 | tr .,- _`
# strip everything that's not a digit, then use cut to get the first field
pkg_version=`$COMMAND --version|head -n 1|sed 's/^.*)[^0-9]*//'|cut -d' ' -f1`
@@ -56,7 +56,7 @@ version_compare ()
# arg3: MINOR
# arg4: MICRO
{
- VARPREFIX=$1
+ VARPREFIX=`echo $1 | tr .,- _`
MAJOR=$2
MINOR=$3
MICRO=$4
@@ -126,7 +126,7 @@ version_check ()
# don't check if asked not to
test -z "$NOCHECK" && {
- echo -n " checking for $COMMAND >= $VERSION ... "
+ printf " checking for $COMMAND >= $VERSION ... "
} || {
# we set a var with the same name as the package, but stripped of
# unwanted chars