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
FILE=$2
GIT=$(which git)
SED=$(which sed)
GIT=$(command -v git)
SED=$(command -v sed)
if [ -d "${DIR}/.git/" ] && [ -n "${GIT}" ]
then

View File

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