diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2002-02-12 13:04:28 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2002-02-12 13:04:28 +0000 |
commit | 2d7b19ccea5558f1689a287374f645a593291407 (patch) | |
tree | c7f5d1c2493b4142d51a4065707178e080965a28 | |
parent | 42491fe8cbc7f7bd736008e67e6ba1e78cda6d2d (diff) |
adding informative message when we die because of tools problems changed the tr to a small sed thing in the version c...
Original commit message from CVS:
* adding informative message when we die because of tools problems
* changed the tr to a small sed thing in the version check
(why ? because minor 4-p5 translated to 45 using the tr thing, which
is not what we want. Hopefully this doesn't break other possibilities)
-rw-r--r-- | gst-autogen.sh | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/gst-autogen.sh b/gst-autogen.sh index 8b99463..c22387c 100644 --- a/gst-autogen.sh +++ b/gst-autogen.sh @@ -49,9 +49,9 @@ version_check () debug "pkg_version $pkg_version" # 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:]` + pkg_major=`echo $pkg_version | cut -d. -f1 | sed s/[a-zA-Z\-].*//g` + pkg_minor=`echo $pkg_version | cut -d. -f2 | sed s/[a-zA-Z\-].*//g` + pkg_micro=`echo $pkg_version | cut -d. -f3 | sed s/[a-zA-Z\-].*//g` test -z "$pkg_minor" && pkg_minor=0 test -z "$pkg_micro" && pkg_micro=0 @@ -78,6 +78,7 @@ version_check () echo echo "You must have $PACKAGE $VERSION or greater to compile $package." echo "Get the latest version from $URL" + echo return 1 else echo "found $pkg_version, ok." @@ -97,6 +98,20 @@ autoconf_2.52d_check () fi } +die_check () +{ + # call with $DIE + # if set to 1, we need to print something helpful then die + DIE=$1 + if test "x$DIE" = "x1"; + then + echo + echo "- Please get the right tools before proceeding." + echo "- Alternatively, if you're sure we're wrong, run with --autogen-nocheck." + exit 1 + fi +} + autogen_options () { for i in $@; do |