X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=autogen.sh;h=f75ad605a66f2474943afb8fdc78fffa1d12f6e9;hb=740bc001fb647255709b5385d5a8a19781722097;hp=902181d8209f452e45ad632324626ac21154a749;hpb=b3aeac1deb4a0aa645f144ace4c4688f4655489b;p=catta diff --git a/autogen.sh b/autogen.sh index 902181d..f75ad60 100755 --- a/autogen.sh +++ b/autogen.sh @@ -26,12 +26,14 @@ run_versioned() { V=$(echo "$2" | sed -e 's,\.,,g') - if type -p "$1$V" &> /dev/null ; then + if [ -e "`which $1$V`" ] ; then P="$1$V" - elif type -p "$1-$2" &> /dev/null ; then - P="$1-$2" else - P="$1" + if [ -e "`which $1-$2`" ] ; then + P="$1-$2" + else + P="$1" + fi fi shift 2