adb-twrp/tools/helper.sh
2022-04-22 23:38:10 +03:00

13 lines
362 B
Bash

confirm_question(){
read -p "You are sure? [y/N]" answ
if [[ $answ == "y" ]] || [[ $answ == "Y" ]];
then
return 0
elif [[ $answ == "n" ]] || [[ $answ == "N" ]] || [[ $answ == "" ]];then
echo "Operation $1 canceled!"
read -n 1 -s -r -p "Press any key to continue"
return 1
else
confirm_question
fi
}