diff options
| author | Leah Rowe <leah@libreboot.org> | 2025-04-23 04:31:40 +0100 | 
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2025-04-23 04:31:40 +0100 | 
| commit | 9543a325acbed4ad58294fe97556ef2acc9e961b (patch) | |
| tree | 495ddb1c6bd64692aae15276ac9750483dec92e0 /include | |
| parent | 9baabed7186c319d6dff6c295c96b26f3832ba1d (diff) | |
lib.sh: further simplify the python check
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/lib.sh | 8 | 
1 files changed, 2 insertions, 6 deletions
diff --git a/include/lib.sh b/include/lib.sh index 45eb2b3d..eda338a0 100644 --- a/include/lib.sh +++ b/include/lib.sh @@ -98,13 +98,9 @@ for fv in version versiondate; do  	eval "[ ! -f \".$fv\" ] || read -r $fv < \".$fv\" || :"  done -pyver="2"  python="python3" -if command -v python3 1>/dev/null; then -	pyver="3" -else -	python="python" -fi +command -v python3 1>/dev/null || python="python" +pyver="2" && [ "$python" = "python3" ] && pyver="3"  command -v $python 1>/dev/null || pyver=""  [ -z "$pyver" ] || \  	$python -c 'import sys; print(sys.version_info[:])' 1>/dev/null \  | 
