Update linutil-installer.sh

This commit is contained in:
solomoncyj 2024-10-16 09:17:37 +08:00 committed by GitHub
parent 54f7e462ec
commit 34b0dfc485
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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