match input if it's "y" or "yes" (case-insensitive)

This commit is contained in:
tteckster 2023-03-08 15:03:22 -05:00 committed by GitHub
parent 259ba993a2
commit 12d5a78a30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
87 changed files with 104 additions and 104 deletions

View file

@ -69,7 +69,7 @@ trap - ERR
if ping -c 1 -W 1 1.1.1.1 &> /dev/null; then msg_ok "Internet Connected"; else
msg_error "Internet NOT Connected"
read -r -p "Would you like to continue anyway? <y/N> " prompt
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}"
else
echo -e " 🖧 Check Network Settings"
@ -206,7 +206,7 @@ sudo systemctl restart postgresql
msg_ok "Installed PostgreSQL"
read -r -p "Would you like to add Adminer? <y/N> " prompt
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
ADMINER="Y"
else
ADMINER="N"