Last active
July 23, 2024 06:12
-
-
Save AbelVM/e6ba0321019d37ee5edb8d935a6cd716 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/zsh | |
autoload colors && colors | |
echo '' | |
echo $fg_bold[magenta] 'Let`s update everything...'$reset_color | |
echo '' | |
echo $fg_no_bold[green] '1. Snap'$reset_color | |
if ! command -v snap &> /dev/null | |
then | |
echo $fg_no_bold[yellow] 'There`s no app installed via Snap'$reset_color | |
else | |
sudo snap refresh | |
fi; | |
echo '' | |
echo $fg_no_bold[green] '2. Apt'$reset_color | |
sudo systemctl daemon-reload | |
sudo apt update && sudo apt full-upgrade -y; | |
echo '' | |
echo $fg_no_bold[green] '3. Flatpack'$reset_color | |
if ! command -v flatpak &> /dev/null | |
then | |
echo $fg_no_bold[yellow] 'There`s no app installed via Flatpack'$reset_color | |
else | |
flatpak update --appstream && flatpak update -y | |
fi; | |
echo '' | |
echo $fg_no_bold[green] '4. Drivers'$reset_color | |
sudo ubuntu-drivers install; | |
echo '' | |
echo $fg_no_bold[green] '5. OMZ'$reset_color | |
if ! command -v zsh &> /dev/null | |
then | |
echo $fg_no_bold[yellow] 'ZSH and/or OhMyZSH! are not installed'$reset_color | |
else | |
zsh -ic "omz update" | |
fi; | |
echo '' | |
echo $fg_no_bold[green] '6. Firmwares'$reset_color | |
if ! command -v fwupdmgr &> /dev/null | |
then | |
echo $fg_no_bold[yellow] 'LVFS is not available'$reset_color | |
else | |
fwupdmgr refresh --force && sudo fwupdmgr get-updates | |
echo '' | |
echo $fg_no_bold[yellow] 'If there are new firmwares available and you want to perform the update, run' | |
echo '' | |
echo ' sudo fwupdmgr upgrade'$reset_color | |
fi; | |
echo '' | |
echo $fg_bold[magenta] 'DONE'$reset_color | |
echo '' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment