Skip to content

Instantly share code, notes, and snippets.

@LetUsFlow
Last active April 27, 2023 06:57
Show Gist options
  • Save LetUsFlow/9e3f196a99b18b260282a4c3b727b50c to your computer and use it in GitHub Desktop.
Save LetUsFlow/9e3f196a99b18b260282a4c3b727b50c to your computer and use it in GitHub Desktop.
#!/bin/bash
TEXT_RESET='\e[0m'
TEXT_YELLOW='\e[0;33m'
TEXT_RED_B='\e[1;31m'
sudo dnf upgrade
echo -e $TEXT_YELLOW
echo 'DNF upgrade finished...'
echo -e $TEXT_RESET
sudo dnf autoremove
echo -e $TEXT_YELLOW
echo 'DNF autoremove finished...'
echo -e $TEXT_RESET
if ! needs-restarting -r; then
echo -e $TEXT_RED_B
echo 'Reboot required!'
echo -e $TEXT_RESET
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment