This commit is contained in:
pika 2025-05-07 10:46:23 +02:00
parent 3785b242c8
commit 007468e5b8

View file

@ -105,13 +105,6 @@ get_packager() {
$_sudo pacman -S --noconfirm "$@" $_sudo pacman -S --noconfirm "$@"
fi fi
} }
if command_exists paru; then
silentexec paru -Sy
elif command_exists yay; then
silentexec yay -Sy
else
silentexec $_sudo pacman -Sy
fi
;; ;;
opensuse*) opensuse*)
opensuse="true" opensuse="true"
@ -157,20 +150,27 @@ get_packager() {
fi fi
} }
update_package_list() {
case "$distro" in
ubuntu | debian) $_sudo apt-get update ;;
fedora) $_sudo dnf update ;;
arch)
if command_exists paru; then
silentexec paru -Sy
elif command_exists yay; then
silentexec yay -Sy
else
silentexec $_sudo pacman -Sy
fi
;;
opensuse) $_sudo zypper ref ;;
alpine) $_sudo apk update ;;
*) echo_error "Unsupported distribution: $distro" ;;
esac
}
if check_root; then if check_root; then
get_packager && get_packager &&
if $arch; then update_package_list
echo "Arch it is.."
elif $debian; then
echo "Debian it is.."
elif $ubuntu; then
echo "Ubuntu it is.."
elif $fedora; then
echo "Fedora it is.."
elif $opensuse; then
echo "OpenSuse it is.."
elif $alpine; then
echo "Alpine it is.."
fi
fi fi