From 2149d47aabb5042b3f8b4ed2b3565eedd284e697 Mon Sep 17 00:00:00 2001 From: Brad Ganley Date: Sun, 17 Mar 2019 01:50:06 -0500 Subject: [PATCH] Committing fixes in the dark, seriously, who killed my power!? --- Arch/.bashrc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Arch/.bashrc b/Arch/.bashrc index 6bc94a5..df0cbf8 100644 --- a/Arch/.bashrc +++ b/Arch/.bashrc @@ -161,6 +161,21 @@ needReboot(){ CURRENT_KERNEL=`uname -r` if [ ! "${CURRENT_KERNEL}" = "${FIND}" ]; then echo -e "Booted kernel version is $CURRENT_KERNEL.\n\nReboot required" + echo -e "\033[0;31m\n\n Would you like to reboot now?\033[0;0m(y/n)" + read answer + case $answer in + y) + echo "Rebooting now" + sleep 10s + reboot + ;; + n) + echo -e "\nOkay, but that's probably\ngoing to piss you off later" + ;; + *) + echo "That's not an option" + ;; + esac fi fi }