]> git.meshlink.io Git - catta/commitdiff
improve autgen.sh version check
authorLennart Poettering <lennart@poettering.net>
Wed, 19 Oct 2005 13:40:05 +0000 (13:40 +0000)
committerLennart Poettering <lennart@poettering.net>
Wed, 19 Oct 2005 13:40:05 +0000 (13:40 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@822 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

autogen.sh

index 9205c57c6c4cbe6285ff2a62d6e080854c73acf6..1514221467493e9f8e1142a5d564ec0ad9c32063 100755 (executable)
@@ -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" "$@"