Last active
April 3, 2016 10:07
-
-
Save StudioLE/cc5b1bbf4c82ec37a624 to your computer and use it in GitHub Desktop.
Shell Tools Suite
This file contains hidden or 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 | |
| echo "apt-get update & upgrade wizard" | |
| echo "Would you like to assume yes? [y/n]" | |
| read input_force | |
| if [ $input_force = y ] | |
| then | |
| force="--yes" | |
| fi | |
| apt update | |
| apt upgrade $force | |
| echo "Run full-upgrade? [y/n]" | |
| read full_upgrade | |
| if [ $full_upgrade = n ] | |
| then | |
| echo "Aborted" | |
| exit | |
| fi | |
| apt full-upgrade $force | |
| if [ ! -f /var/run/reboot-required ] | |
| then | |
| echo "No reboot required" | |
| exit | |
| fi | |
| echo "A reboot is required" | |
| echo "Would you like to reboot now? [y/n]" | |
| read reboot_now | |
| if [ $reboot_now = y ] | |
| then | |
| echo "Rebooting" | |
| reboot | |
| fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment