From 34b0dfc48588341f479b39775d5f01c29f892b6b Mon Sep 17 00:00:00 2001 From: solomoncyj Date: Wed, 16 Oct 2024 09:17:37 +0800 Subject: [PATCH] Update linutil-installer.sh --- core/tabs/applications-setup/linutil-installer.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/tabs/applications-setup/linutil-installer.sh b/core/tabs/applications-setup/linutil-installer.sh index 7270626c..0794b34a 100755 --- a/core/tabs/applications-setup/linutil-installer.sh +++ b/core/tabs/applications-setup/linutil-installer.sh @@ -27,15 +27,19 @@ installLinutil() { ;; zypper) printf '%s\n' 'detecting flavor' - [ zypper lr | grep -q "Tumbleweed" ] && flavor="Tumbleweed" || flavor="Slowroll" + if zypper lr | grep -Fq Tumbleweed + then flavor=Tumbleweed + else flavor=Slowroll + fi + printf '%b%s%b\n' "flavor detected is ${GREEN}" "$flavor" "$RC" printf "\n" "setting up repos" - if [[ $flavor == Tumbleweed ]] + if [ "$flavor" = Tumbleweed ] then "$ESCALATION_TOOL" "$PACKAGER" --gpg-auto-import-keys addrepo https://download.opensuse.org/repositories/home:solomoncyj/openSUSE_Tumbleweed/home:solomoncyj.repo fi - if [ $flavor == "Slowroll" ] + if [ "$flavor" = Slowroll ] then "$ESCALATION_TOOL" "$PACKAGER" --gpg-auto-import-keys addrepo https://download.opensuse.org/repositories/home:solomoncyj/openSUSE_Slowroll/home:solomoncyj.repo fi