Skip to content

Commit

Permalink
[utils/common] Better Python version handling
Browse files Browse the repository at this point in the history
  • Loading branch information
goldyfruit committed Dec 6, 2023
1 parent d17cf53 commit 1b44872
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,10 @@ function get_os_information() {
# the installer will exit with a message.
function required_packages() {
echo -ne "➤ Validating installer package requirements... "
PYTHON_VERSION="3.11"
case "$DISTRO_NAME" in
debian | ubuntu)
[ "$DISTRO_VERSION_ID" -gt 11 ] && PYTHON_VERSION="3.11" || PYTHON_VERSION="3"
[ "$DISTRO_VERSION_ID" -lt 12 ] && PYTHON_VERSION="3"
export PYTHON_VERSION
apt-get update &>>"$LOG_FILE"
apt-get install --no-install-recommends -y "python${PYTHON_VERSION}" "python${PYTHON_VERSION}-dev" python3-pip "python${PYTHON_VERSION}-venv" whiptail expect jq &>>"$LOG_FILE"
Expand Down

0 comments on commit 1b44872

Please sign in to comment.