Skip to content

Commit

Permalink
[utils/common] Handle Debian Bullseye older Python versio
Browse files Browse the repository at this point in the history
  • Loading branch information
goldyfruit committed Dec 4, 2023
1 parent a482f80 commit 07e8d22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ function get_os_information() {
source "$OS_RELEASE"

export DISTRO_NAME="$ID"
export DISTRO_VERSION_ID="$VERSION_ID"
export DISTRO_VERSION="$VERSION"
export KERNEL PYTHON
else
Expand All @@ -189,8 +190,9 @@ function required_packages() {
echo -ne "➤ Validating installer package requirements... "
case "$DISTRO_NAME" in
debian | ubuntu)
[ "$DISTRO_VERSION_ID" -gt 11 ] && python_version="3.11" || python_version="3"
apt-get update &>>"$LOG_FILE"
apt-get install --no-install-recommends -y python3.11 python3.11-dev python3-pip python3.11-venv whiptail expect jq &>>"$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"
;;
fedora)
dnf install -y python3.11 python3.11-devel python3-pip python3-virtualenv newt expect jq &>>"$LOG_FILE"
Expand Down

0 comments on commit 07e8d22

Please sign in to comment.