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

@ -41,7 +41,7 @@ clear
EOF
read -r -p "Switch from dbus-daemon to dbus-broker? <y/N> " prompt
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
cat <<EOF >>/etc/apt/sources.list
deb http://deb.debian.org/debian bullseye-backports main contrib non-free
@ -52,7 +52,7 @@ apt-get -t bullseye-backports install -y dbus-broker &>/dev/null
systemctl enable dbus-broker.service &>/dev/null
fi
read -r -p "Install BlueZ? <y/N> " prompt
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
apt-get -t bullseye-backports install -y bluez* &>/dev/null
fi
echo -e "Finished, reboot for changes to take affect"