Last active
October 26, 2022 20:18
-
-
Save tlesh989/dc81ac8f54002528a1e3066950b55127 to your computer and use it in GitHub Desktop.
Linux Fish system update function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function update | |
if [ "$(which apt-get 2>/dev/null)" != '' ] | |
sudo apt update -y | |
sudo apt upgrade -y | |
sudo apt autoremove -y | |
else if [ "$(which dnf 2>/dev/null)" != '' ] | |
sudo dnf update -y | |
end | |
if [ "$(which snap 2>/dev/null)" != '' ] | |
sudo snap refresh | |
end | |
if [ "$(which flatpak 2>/dev/null)" != '' ] | |
sudo flatpak update -y | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment