summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-04-23 04:04:03 +0100
committerLeah Rowe <leah@libreboot.org>2025-04-23 04:04:03 +0100
commit13ad839691d3f306f880e70f98e90af01de2fda0 (patch)
treefe15f6fcf10c42301086b54ac6e094ef578e3adf /include
parentb1ea4165754f04660d3c7282274c4b12355f88a0 (diff)
lib.sh: simplify the python check
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
-rw-r--r--include/lib.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/lib.sh b/include/lib.sh
index d72f0378..6667b505 100644
--- a/include/lib.sh
+++ b/include/lib.sh
@@ -113,10 +113,8 @@ command -v $python 1>/dev/null || pyver=""
pyver="`$python -c 'import sys; print(sys.version_info[:])' | \
awk '{print $1}'`" && \
pyver="${pyver#(}" && pyver="${pyver%,}"
-if [ "${pyver%%.*}" != "3" ]; then
- printf "Wrong python version, or python missing. Must be v 3.x.\n" 1>&2
- exit 1
-fi
+[ "${pyver%%.*}" = "3" ] || \
+ $err "Wrong python version, or python missing. Must be v 3.x."
# XBMK_CACHE is a directory, for caching downloads and git repositories
[ -z "${XBMK_CACHE+x}" ] && export XBMK_CACHE="$xbmkpwd/cache"