Allow using upper-cased "Y" to answer questions (#45)

This commit is contained in:
FLGX
2020-08-15 19:18:32 +02:00
committed by GitHub
parent 0c8886a2b2
commit ec0fcc15d2
6 changed files with 37 additions and 37 deletions

View File

@@ -76,7 +76,7 @@ else
warning "Something is wrong with your cpusched selection. Do you want to fallback to CFS (default)?"
read -rp "`echo $' > N/y : '`" _fallback;
fi
if [ "$_fallback" == "y" ] || [ "$_nofallback" == "true" ]; then
if [[ "$_fallback" =~ [yY] ]] || [ "$_nofallback" == "true" ]; then
echo "_cpusched=\"cfs\"" > "$_where"/cpuschedset
else
error "Exiting..."
@@ -167,7 +167,7 @@ user_patcher() {
printf '%s\n' "${_patches[@]}"
read -rp "Do you want to install it/them? - Be careful with that ;)"$'\n> N/y : ' _CONDITION;
fi
if [ "$_CONDITION" == "y" ] || [ "$_user_patches_no_confirm" == "true" ]; then
if [[ "$_CONDITION" =~ [yY] ]] || [ "$_user_patches_no_confirm" == "true" ]; then
for _f in "${_patches[@]}"; do
if [ -e "${_f}" ]; then
msg2 "######################################################"
@@ -189,7 +189,7 @@ user_patcher() {
printf '%s\n' "${_patches[@]}"
read -rp "Do you want to install it/them? - Be careful with that ;)"$'\n> N/y : ' _CONDITION;
fi
if [ "$_CONDITION" == "y" ] || [ "$_user_patches_no_confirm" == "true" ]; then
if [[ "$_CONDITION" =~ [yY] ]] || [ "$_user_patches_no_confirm" == "true" ]; then
for _f in "${_patches[@]}"; do
if [ -e "${_f}" ]; then
msg2 "######################################################"