use type instead of which to test for required tools

This commit is contained in:
Tilman Kranz 2025-03-30 05:58:22 +02:00
parent 3956e95814
commit 3a491e398d

View File

@ -433,13 +433,13 @@ else
fi
fi
if test -z "$(which jq)" ; then
if test -z "$(type -p jq)" ; then
echo "ERROR: Required executable \"jq\" not found." >&2
rv=1
elif test -z "$(which pactl)" ; then
elif test -z "$(type -p pactl)" ; then
echo "ERROR: Required executable \"pactl\" not found." >&2
rv=1
elif test -z "$(which ssh)" ; then
elif test -z "$(type -p ssh)" ; then
echo "ERROR: Required executable \"ssh\" not found." >&2
rv=1
fi