Last active
February 22, 2024 23:58
-
-
Save kyletimmermans/138bb72ae7a17e6e1c38e50b31bb60de to your computer and use it in GitHub Desktop.
Pop!_OS Super Updater
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
#!/usr/bin/env bash | |
# Credits to Willi Mutschler @ mutschler.dev for the update commands | |
# https://mutschler.dev/linux/pop-os-post-install/ | |
echo -e "\nThis program requires that your machine is connected to" | |
echo "a power source and that you are connected to the internet." | |
echo -e "\nTHIS PROGRAM WILL REBOOT YOUR MACHINE AFTER IT FINISHES!\n" | |
read -p "Are you connected to a power source and the internet? (Y/n): " reply | |
if ! [[ $reply =~ ^[Yy]$ ]]; then | |
echo "Please connect to a power source and the internet" | |
exit 1 | |
fi | |
echo "" | |
read -p "Do you want the Y/n prompts of the update commands to automatically answer 'Y'? (Y/n): " yes | |
sudo echo -n "" # Initiate sudo before commands | |
if [[ $yes =~ ^[Yy]$ ]]; then | |
sudo apt update | |
sudo apt upgrade -y | |
sudo apt dist-upgrade -y | |
sudo apt autoremove -y | |
sudo apt autoclean -y | |
sudo fwupdmgr get-devices | |
sudo fwupdmgr get-updates | |
sudo fwupdmgr update -y | |
flatpak update -y | |
sudo pop-upgrade recovery upgrade from-release | |
sudo reboot now | |
else | |
sudo apt update | |
sudo apt upgrade | |
sudo apt dist-upgrade | |
sudo apt autoremove | |
sudo apt autoclean | |
sudo fwupdmgr get-devices | |
sudo fwupdmgr get-updates | |
sudo fwupdmgr update | |
flatpak update | |
sudo pop-upgrade recovery upgrade from-release | |
sudo reboot now | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment