Use `command' (shell builtin and POSIX) instead

The `which' command is a fork and possible not standard in various
distributions, or builtin in certain (odd)? shells, like `zsh'.

Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Cristian Ionescu-Idbohrn 2017-02-08 18:03:22 +01:00 committed by Dirk Hohndel
parent 0e7d8993a2
commit 9470278e87

View file

@ -40,7 +40,7 @@ fi
# make sure we have the required commands installed
MISSING=""
for i in git cmake autoconf libtool java ant wget unzip; do
which $i > /dev/null 2>&1 ||
command -v $i >/dev/null ||
if [ "$i" = "libtool" ] ; then
MISSING="${MISSING}libtool-bin "
elif [ "$i" = "java" ] ; then