From 4d4ab8ce59fc071165a3f61daede4501b56fdad4 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 23 Apr 2025 04:27:03 +0100 Subject: [PATCH] lib.sh: condense the python check Signed-off-by: Leah Rowe --- include/lib.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/lib.sh b/include/lib.sh index 7c2cbf6..bbc3af7 100644 --- a/include/lib.sh +++ b/include/lib.sh @@ -111,10 +111,8 @@ command -v $python 1>/dev/null || pyver="" 2>/dev/null || $err "Cannot determine which Python version." [ -n "$pyver" ] && \ pyver="`$python -c 'import sys; print(sys.version_info[:])' | \ - awk '{print $1}'`" && \ - pyver="${pyver#(}" && pyver="${pyver%,}" -[ "${pyver%%.*}" = "3" ] || \ - $err "Wrong python version, or python missing. Must be v 3.x." + awk '{print $1}'`" && pyver="${pyver#(}" && pyver="${pyver%,}" +[ "${pyver%%.*}" = "3" ] || $err "Wrong python version (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"