Improves opensuse detection (#135)

* Adds OpenSUSE Tumbleweed to detected distributions

* Adds OpenSUSE Leap detection

* Fixes OpenSUSE Tumbleweed package installation

* Fixes openSUSE section comment
This commit is contained in:
Alex Speranza 2020-12-07 20:27:34 +01:00 committed by GitHub
parent a5cc64d6b2
commit 070103dc0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 4 deletions

View File

@ -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