mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-19 09:08:13 +02:00
lib.sh: simplify the python check
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+2
-4
@@ -113,10 +113,8 @@ command -v $python 1>/dev/null || pyver=""
|
|||||||
pyver="`$python -c 'import sys; print(sys.version_info[:])' | \
|
pyver="`$python -c 'import sys; print(sys.version_info[:])' | \
|
||||||
awk '{print $1}'`" && \
|
awk '{print $1}'`" && \
|
||||||
pyver="${pyver#(}" && pyver="${pyver%,}"
|
pyver="${pyver#(}" && pyver="${pyver%,}"
|
||||||
if [ "${pyver%%.*}" != "3" ]; then
|
[ "${pyver%%.*}" = "3" ] || \
|
||||||
printf "Wrong python version, or python missing. Must be v 3.x.\n" 1>&2
|
$err "Wrong python version, or python missing. Must be v 3.x."
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# XBMK_CACHE is a directory, for caching downloads and git repositories
|
# XBMK_CACHE is a directory, for caching downloads and git repositories
|
||||||
[ -z "${XBMK_CACHE+x}" ] && export XBMK_CACHE="$xbmkpwd/cache"
|
[ -z "${XBMK_CACHE+x}" ] && export XBMK_CACHE="$xbmkpwd/cache"
|
||||||
|
|||||||
Reference in New Issue
Block a user