diff options
author | Leah Rowe <leah@libreboot.org> | 2025-04-23 04:27:03 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-04-23 04:27:03 +0100 |
commit | 9baabed7186c319d6dff6c295c96b26f3832ba1d (patch) | |
tree | db7aedc758dbd0cad874ffba97adb93ddfd59b28 /include/lib.sh | |
parent | 0c5c5ffc873f7818930115a37b8b2a592a6e37a2 (diff) |
lib.sh: condense the python check
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/lib.sh')
-rw-r--r-- | include/lib.sh | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/lib.sh b/include/lib.sh index 739823a9..45eb2b3d 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" |