Skip to content

Commit

Permalink
[utils/common] Add Python repo when Ubuntu > 23.10 detected
Browse files Browse the repository at this point in the history
  • Loading branch information
goldyfruit committed May 20, 2024
1 parent 590803d commit 10e7a06
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions utils/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,13 @@ function required_packages() {
case "$DISTRO_NAME" in
debian | ubuntu | raspbian | linuxmint | zorin)
[ "$DISTRO_VERSION_ID" == "11" ] && export PYTHON_VERSION="3"
if [ "$(ver "$DISTRO_VERSION_ID")" -ge "$(ver 24.04)" ]; then
{
apt-get update
apt-get install --no-install-recommends -y software-properties-common
add-apt-repository ppa:deadsnakes/ppa
} &>>"$LOG_FILE"
fi
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 "${extra_packages[@]}" &>>"$LOG_FILE"
;;
Expand Down

0 comments on commit 10e7a06

Please sign in to comment.