Created
March 14, 2019 17:34
-
-
Save axelitus/80f5a3bd06ff3647a9b1f17a25e52db8 to your computer and use it in GitHub Desktop.
Upgrade alias
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
alias upgrade="time (sudo apt update && sudo apt list --upgradable && echo -n \"Do you want to continue? [y]n: \" && read answer && if [[ -z \"\$answer\" || \"\$answer\" != \"\${answer#[Yy]}\" ]]; then (echo -e \"\e[32mUpdating packages... \e[0m\" && sudo apt full-upgrade -y); else echo -e \"\e[33mThe update has been cancelled. No change has been made. \e[0m\"; fi)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment