diff options
author | Sebastien Estienne <sebastien.estienne@gmail.com> | 2005-10-23 16:10:31 +0000 |
---|---|---|
committer | Sebastien Estienne <sebastien.estienne@gmail.com> | 2005-10-23 16:10:31 +0000 |
commit | a6a50fcf1a7160fe0d7394f00c04b8f21693595f (patch) | |
tree | e4e7fd04b530d322861d76808eff1601dc0b7b0e /autogen.sh | |
parent | fa3d2c43f5d0b1c7f52343c5660fe86ad7ec0982 (diff) |
* make run_versionned more /bin/sh friendly
git-svn-id: file:///home/lennart/svn/public/libdaemon/trunk@92 153bfa13-eec0-0310-be40-b0cb6a0e1b4b
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -25,12 +25,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 |