From 070103dc0d6701f94c77eb1b0aa3cd9d90d22150 Mon Sep 17 00:00:00 2001 From: Alex Speranza Date: Mon, 7 Dec 2020 20:27:34 +0100 Subject: [PATCH] Improves opensuse detection (#135) * Adds OpenSUSE Tumbleweed to detected distributions * Adds OpenSUSE Leap detection * Fixes OpenSUSE Tumbleweed package installation * Fixes openSUSE section comment --- auto-cpufreq-installer | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/auto-cpufreq-installer b/auto-cpufreq-installer index fd2e6a0..d46b75c 100755 --- a/auto-cpufreq-installer +++ b/auto-cpufreq-installer @@ -100,13 +100,18 @@ then separator complete_msg separator -# OpenSUSE Tumbleweed -elif [ -f /etc/os-release ] && eval "$(cat /etc/os-release)" && [ $ID == "opensuse-tumbleweed" ]; +# OpenSUSE +elif [ -f /etc/os-release ] && eval "$(cat /etc/os-release)" && [[ $ID == "opensuse"* ]]; then separator - echo -e "\nDetected OpenSUSE Tumbleweed distribution\n" + echo -e "\nDetected an OpenSUSE distribution\n" echo -e "\nSetting up Python environment\n" - zypper install python38 python3-pip python3-setuptools + if [[ $ID == "opensuse-leap" ]]; + then + zypper install -y python3 python3-pip python3-setuptools python3-devel gcc + else + zypper install -y python38 python3-pip python3-setuptools python3-devel gcc + fi echo -e "\nInstalling necessary Python packages\n" pip_pkg_install separator