From 13ad839691d3f306f880e70f98e90af01de2fda0 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 23 Apr 2025 04:04:03 +0100 Subject: lib.sh: simplify the python check Signed-off-by: Leah Rowe --- include/lib.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'include/lib.sh') 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" -- cgit v1.2.1