diff options
author | Wilke Schwiedop <drwilly@drwilly.de> | 2021-11-30 21:42:54 +0300 |
---|---|---|
committer | Wilke Schwiedop <drwilly@drwilly.de> | 2021-11-30 21:42:54 +0300 |
commit | cf40e21edafa7ed94d8a1b83f52b5ca5b92b5322 (patch) | |
tree | 874b83dd80e1ac35578dd4010526da89f26a7773 | |
parent | d9f08ead9faf736eb93ff0b4b2ae407b03c0b790 (diff) |
remove calls to non-posix tool `which`
`which` is a non-posix tool that might not be present in restricted
build-environments. It can however be fully replaced by the posix
shell-builtin `command -v`.
-rwxr-xr-x | bootstrap | 8 | ||||
-rwxr-xr-x | tests/xorg-test-run.sh | 2 |
2 files changed, 5 insertions, 5 deletions
@@ -1,27 +1,27 @@ #!/bin/sh -which autoconf +command -v autoconf if ! test $? -eq 0 then echo "error, install autoconf" exit 1 fi -which automake +command -v automake if ! test $? -eq 0 then echo "error, install automake" exit 1 fi -which libtool || which libtoolize +command -v libtool || command -v libtoolize if ! test $? -eq 0 then echo "error, install libtool" exit 1 fi -which pkg-config +command -v pkg-config if ! test $? -eq 0 then echo "error, install pkg-config" diff --git a/tests/xorg-test-run.sh b/tests/xorg-test-run.sh index 9ca9fdb..338ff76 100755 --- a/tests/xorg-test-run.sh +++ b/tests/xorg-test-run.sh @@ -43,7 +43,7 @@ XORG_ARGS="$@" # If the X server has setuid bit, make a local copy -XORG_FULL=`which $XORG` +XORG_FULL=`command -v $XORG` if test -u $XORG_FULL; then XORG=`pwd`/Xorg.no-setuid echo "$XORG_FULL has setuid bit set, will use $XORG" |