From ed7c357edb68168cac4e18ea795a07e9046f022e Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 25 Mar 2022 09:28:41 -0400 Subject: [PATCH] Update scaling-governor.sh --- misc/scaling-governor.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/misc/scaling-governor.sh b/misc/scaling-governor.sh index cedd41a0..cddc2dbb 100644 --- a/misc/scaling-governor.sh +++ b/misc/scaling-governor.sh @@ -1,5 +1,14 @@ #!/usr/bin/env bash set -e +while true; do + read -p "Change CPU Scaling Governors. Proceed(y/n)?" yn + case $yn in + [Yy]* ) break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done +clear show_menu(){ CL=`echo "\033[m"` GN=`echo "\033[32m"` @@ -24,7 +33,7 @@ show_menu(){ printf "${BL}**${YW} 5)${GN} Switch to ${BL}performance${CL}${GN} CPU Scaling Governor ${CL}\n" printf "${BL}**${YW} 6)${GN} Switch to ${BL}schedutil${CL}${GN} CPU Scaling Governor ${CL}\n" printf "\n ${fgred}NOTE: Settings return to default after reboot${CL}\n" - printf "\n Please choose an option from the menu and press [ENTER] or ${fgred}x to exit. ${CL}" + printf "\n Please choose an option from the menu and press [ENTER] or ${fgred}x${CL} to exit." read opt } clear