wip
This commit is contained in:
parent
3785b242c8
commit
007468e5b8
1 changed files with 20 additions and 20 deletions
40
distros.sh
40
distros.sh
|
@ -105,13 +105,6 @@ get_packager() {
|
|||
$_sudo pacman -S --noconfirm "$@"
|
||||
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="true"
|
||||
|
@ -157,20 +150,27 @@ get_packager() {
|
|||
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
|
||||
get_packager &&
|
||||
if $arch; then
|
||||
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
|
||||
update_package_list
|
||||
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue