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 <madduck@madduck.net>
This commit is contained in:
martin f. krafft 2021-09-21 05:21:43 +12:00 committed by GitHub
parent d9bfc9c37e
commit abac464384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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}