From: Lennart Poettering Date: Wed, 19 Oct 2005 13:40:05 +0000 (+0000) Subject: improve autgen.sh version check X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=35e5f1fd14f04d201e39c85f7772579d21f4bfdb;p=catta improve autgen.sh version check git-svn-id: file:///home/lennart/svn/public/avahi/trunk@822 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/autogen.sh b/autogen.sh index 9205c57..1514221 100755 --- a/autogen.sh +++ b/autogen.sh @@ -22,7 +22,17 @@ VERSION=1.9 run_versioned() { local P - type -p "$1-$2" &> /dev/null && P="$1-$2" || local P="$1" + local V + + V=$(echo "$VERSION" | sed -e 's,\.,,g') + + if type -p "$1$V" &> /dev/null ; then + P="$1$V" + elif type -p "$1-$2" &> /dev/null ; then + P="$1-$2" + else + P="$1" + fi shift 2 "$P" "$@"