From abac464384b2c1beb04f296130a474a6c9e4d0df Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Tue, 21 Sep 2021 05:21:43 +1200 Subject: [PATCH] Replace /usr/bin/which with command -v (#3439) The `which` utility is being phased out since POSIX has mandated `command -v` for the same task, so let's use that in the awesome-client script. Signed-off-by: martin f. krafft --- utils/awesome-client | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/awesome-client b/utils/awesome-client index 8bcbadc8d..85b06985b 100755 --- a/utils/awesome-client +++ b/utils/awesome-client @@ -11,7 +11,7 @@ then # than bash's "read" itself. # It can be disabled/overridden using 'AWESOME_RLWRAP= awesome-client'. if [ -z "${AWESOME_RLWRAP+x}" ]; then - AWESOME_RLWRAP="$(which rlwrap 2>/dev/null)" + AWESOME_RLWRAP="$(command -v rlwrap 2>/dev/null)" fi if [ -n "$AWESOME_RLWRAP" ] then @@ -28,7 +28,7 @@ fi DBUS_SEND=dbus-send -which ${DBUS_SEND} > /dev/null +command -v ${DBUS_SEND} > /dev/null if test $? = 1 then echo "E: Unable to find" ${DBUS_SEND}