Created
February 8, 2025 19:01
-
-
Save rotespferd/35b1ec69f12d22debd2bbb98a1913590 to your computer and use it in GitHub Desktop.
fedora-update.sh
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
#!/bin/bash | |
echo "Create pre snapshot..." | |
timestamp=$(date +%Y%m%d%H%M%S) | |
pre_snapshot_number=$(sudo snapper -c root create --description pre-update-${timestamp} --type pre --cleanup number --print-number) | |
# Update the system | |
echo "--- Updating the system ---" | |
sudo dnf update -y | |
# Update flatpaks | |
echo "" | |
echo "--- Updating flatpaks ---" | |
flatpak update -y | |
# Update VS Code Extensions | |
echo "" | |
echo "--- Updating VS Code Extensions ---" | |
code --update-extensions | |
# Update OhMyZSH | |
echo "" | |
echo "--- Updating OhMyZSH ---" | |
/usr/bin/zsh -c "source /home/marian/.zshrc && omz update && exit" | |
echo "Create post snapshot..." | |
sudo snapper -c root create --description post-update-${timestamp} --type post --cleanup number --pre-number $pre_snapshot_number | |
# send desktop notification | |
notify-send -i dialog-information -t 10000 "System updated" "System has been updated successfully." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment