Scripts: Add Debian/Ubuntu to update.sh

This commit is contained in:
the_4n0nym0u53 2022-02-28 23:00:47 +01:00 committed by GitHub
parent e2b2ddc3f2
commit 9f177a06dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,10 +5,18 @@ if [ "$(uname -o)" = "Android" ]; then
elif [ "$(uname -o)" = "GNU/Linux" ]; then
[ "$(lsb_release -si)" = "Artix" ] && paru
[ "$(lsb_release -si)" = "Fedora" ] && sudo dnf upgrade
if [ "$(lsb_release -si)" = "Debian" ] || [ "$(lsb_release -si)" = "Ubuntu" ]; then
sudo apt update
echo
sudo apt full-upgrade --purge
echo
sudo apt autoremove --purge --yes
fi
fi
command -v flatpak >/dev/null 2>&1 && { echo; flatpak update; }
command -v npm >/dev/null 2>&1 && { echo; npm up -g; }
command -v docker >/dev/null 2>&1 && { echo; docker images | awk '(NR>1) && ($2!~/none/) {print $1":"$2}' | xargs -l docker pull; }
command -v npm >/dev/null 2>&1 && { echo; npm up -g; }
exit 0