mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
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>
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user