Created
March 9, 2016 20:09
-
-
Save anorm/762273d9428f1b4862a4 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# | |
# Inspired by question/answers/comments at | |
# http://stackoverflow.com/questions/3316677/apt-get-update-dist-upgrade-autoremove-autoclean-in-a-single-sudo-command | |
# | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
apt-get -y update | |
apt-get -y dist-upgrade | |
apt-get -y autoremove | |
apt-get -y autoclean | |
echo | |
echo Done. | |
if [ -f /var/run/reboot-required ]; then | |
echo | |
echo You should reboot... | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment