summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-12-30 19:23:27 +0000
committerLeah Rowe <leah@libreboot.org>2024-12-30 19:23:27 +0000
commit0c8107474691a6da793dbc6c6ac18c36ec7ec4a3 (patch)
tree474713c6408f8df66261482ff926c4fc7562c7d8 /include
parent6c7e3ce2d6e92e916a55eb96a86f1c67de590bfc (diff)
use command -v instead of which
which is a non-standard command, whereas command is part of posix Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
-rw-r--r--include/lib.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/lib.sh b/include/lib.sh
index f0126457..ef54f143 100644
--- a/include/lib.sh
+++ b/include/lib.sh
@@ -16,8 +16,8 @@ err="err_"
pyver="2"
python="python3"
-which python3 1>/dev/null || python="python"
-which $python 1>/dev/null || pyver=""
+command -v python3 1>/dev/null || python="python"
+command -v $python 1>/dev/null || pyver=""
[ -n "$pyver" ] && pyver="$($python --version | awk '{print $2}')"
if [ "${pyver%%.*}" != "3" ]; then
printf "Wrong python version, or python missing. Must be v 3.x.\n" 1>&2