This commit is contained in:
pika 2025-05-24 01:29:51 +02:00
parent 215506326a
commit 7908539cea

View file

@ -471,15 +471,21 @@ update-package-list() {
case "$distro" in
ubuntu | debian)
spin bold red "Refreshing $distro sources.."
sleep 1
if ! run $_sudo apt-get update; then
# sleep 1
if run $_sudo apt-get update; then
upclear
check "Refreshed $distro sources.."
else
upclear
throw "Error while updating $distro repositories.."
fi
;;
fedora)
spin blue bold "Refreshing $distro repositories.."
if ! run $_sudo dnf update; then
if run $_sudo dnf update; then
upclear
check "Refreshed $distro sources.."
else
upclear
throw "Error while updating $distro repositories.."
fi
@ -525,17 +531,26 @@ update-package-list() {
# sleep 0.01
if command-exists paru; then
if ! run paru -Sy; then
if run paru -Sy; then
upclear
check "Refreshed $distro sources.."
else
upclear
throw "Error while updating $distro repositories.."
fi
elif command-exists yay; then
if ! run yay -Sy; then
if run yay -Sy; then
upclear
check "Refreshed $distro sources.."
else
upclear
throw "Error while updating $distro repositories.."
fi
else
if ! run $_sudo pacman -Sy; then
if run $_sudo pacman -Sy; then
upclear
check "Refreshed $distro sources.."
else
upclear
throw "Error while updating $distro repositories.."
fi
@ -543,14 +558,20 @@ update-package-list() {
;;
opensuse)
spin bold green "Refreshing $distro repositories.."
if ! run $_sudo zypper ref; then
if run $_sudo zypper ref; then
upclear
check "Refreshed $distro sources.."
else
upclear
throw "Error while updating $distro repositories.."
fi
;;
alpine)
spin bold blue "Refreshing $distro repositories.."
if ! run $_sudo apk update; then
if run $_sudo apk update; then
upclear
check "Refreshed $distro sources.."
else
upclear
throw "Error while updating $distro repositories.."
fi