Skip to content

Instantly share code, notes, and snippets.

@axelitus
Created March 14, 2019 17:34
Show Gist options
  • Save axelitus/80f5a3bd06ff3647a9b1f17a25e52db8 to your computer and use it in GitHub Desktop.
Save axelitus/80f5a3bd06ff3647a9b1f17a25e52db8 to your computer and use it in GitHub Desktop.
Upgrade alias
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