From bc3ee0ca29f6276eb4b41691b7d7f992be8cd665 Mon Sep 17 00:00:00 2001 From: jakaskerl <53253318+jakaskerl@users.noreply.github.com> Date: Sun, 21 May 2023 22:47:20 +0200 Subject: [PATCH] Update install_dependencies.sh $VERSION_ID returns the Ubuntu distribution version. We want the base Ubuntu version. Example - Running Linux Mint (Vera): $VERSION_ID returns 21.1 - which is the Mint version number But the distro is based on 22.04, so the script errors out. "inxi -Sx | grep -oP '(?<=Ubuntu\s)\d+\.\d+')" correctly returns 22.04 --- docs/source/_static/install_dependencies.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/_static/install_dependencies.sh b/docs/source/_static/install_dependencies.sh index 9b25c7a08..996e25992 100755 --- a/docs/source/_static/install_dependencies.sh +++ b/docs/source/_static/install_dependencies.sh @@ -112,7 +112,8 @@ elif [ -f /etc/os-release ]; then if [[ "$ID" == "ubuntu" || "$ID" == "debian" || "$ID_LIKE" == "ubuntu" || "$ID_LIKE" == "debian" || "$ID_LIKE" == "ubuntu debian" ]]; then if [[ ! $(uname -m) =~ ^arm* ]]; then sudo apt-get update - if [[ "$VERSION_ID" > "22.04" || "$VERSION_ID" == "22.04" ]]; then + UBUNTU_VERSION=$(inxi -Sx | grep -oP '(?<=Ubuntu\s)\d+\.\d+') + if [[ "$UBUNTU_VERSION" > "22.04" || "$UBUNTU_VERSION" == "22.04" ]]; then sudo apt-get install -y "${ubuntu_pkgs_post22_04[@]}" else sudo apt-get install -y "${ubuntu_pkgs_pre22_04[@]}"