Use 'command -v' instead of deprecated 'which'

This commit is contained in:
Diederik de Haas 2021-11-10 22:11:03 +01:00
parent 666ecb7903
commit ee40c18b21
No known key found for this signature in database
GPG Key ID: D76E5BCE787EDB6E
3 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
set -e
if test "$1" = "configure"; then
if which update-binfmts >/dev/null; then
if command -v update-binfmts >/dev/null; then
update-binfmts --import llvm-@LLVM_VERSION@-runtime.binfmt || true
fi
fi

View File

@ -3,7 +3,7 @@
set -e
if test "$1" = "remove"; then
if which update-binfmts >/dev/null; then
if command -v update-binfmts >/dev/null; then
update-binfmts --package llvm-@LLVM_VERSION@-runtime \
--remove llvm-@LLVM_VERSION@-runtime.binfmt /usr/bin/lli-@LLVM_VERSION@ || true
if test -f /var/lib/binfmts/llvm-@LLVM_VERSION@.binfmt; then

2
debian/rules vendored
View File

@ -195,7 +195,7 @@ else
control_vars = '-Vdep:devlibs=libstdc++6-$(GCC_VERSION)-dev'
endif
ifeq ($(shell which llvm-spirv),)
ifeq ($(shell command -v llvm-spirv),)
LLVM_SPIRV_INSTALLED = no
else
LLVM_SPIRV_INSTALLED = yes