Use `command -v` instead of `which` (#1704)

`command -v` is the standardized version of `which`
This commit is contained in:
a1346054 2022-09-19 15:06:14 +00:00 committed by GitHub
parent 5ae8fa5a3f
commit 362e3cd6ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -2,8 +2,8 @@
DIR=$1 DIR=$1
FILE=$2 FILE=$2
GIT=$(which git) GIT=$(command -v git)
SED=$(which sed) SED=$(command -v sed)
if [ -d "${DIR}/.git/" ] && [ -n "${GIT}" ] if [ -d "${DIR}/.git/" ] && [ -n "${GIT}" ]
then then

View File

@ -3,9 +3,9 @@
# This code is released in public domain by Dave Davenport <qball@gmpclient.org> # This code is released in public domain by Dave Davenport <qball@gmpclient.org>
# #
ROFI=$(which rofi) ROFI=$(command -v rofi)
SED=$(which sed) SED=$(command -v sed)
MKTEMP=$(which mktemp) MKTEMP=$(command -v mktemp)
if [ -z "${SED}" ] if [ -z "${SED}" ]
then then