summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authora1346054 <36859588+a1346054@users.noreply.github.com>2022-09-19 15:06:14 +0000
committerGitHub <noreply@github.com>2022-09-19 17:06:14 +0200
commit362e3cd6ffd4213fed225e4fa3b4e6e0719ce223 (patch)
treee73cee3543edcec30e127ade103d137f178f31fc
parent5ae8fa5a3f691a0753d7f612ae2b07add7881d4d (diff)
Use `command -v` instead of `which` (#1704)
`command -v` is the standardized version of `which`
-rwxr-xr-xscript/get_git_rev.sh4
-rwxr-xr-xscript/rofi-theme-selector6
2 files changed, 5 insertions, 5 deletions
diff --git a/script/get_git_rev.sh b/script/get_git_rev.sh
index 61813b1c..04725651 100755
--- a/script/get_git_rev.sh
+++ b/script/get_git_rev.sh
@@ -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
diff --git a/script/rofi-theme-selector b/script/rofi-theme-selector
index e0cb8581..1dab0686 100755
--- a/script/rofi-theme-selector
+++ b/script/rofi-theme-selector
@@ -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