From 7a5ebbe866b4ed6c5f73d286ac2c188af3245561 Mon Sep 17 00:00:00 2001 From: 5olu7ion Date: Fri, 9 Jun 2023 23:07:21 +0200 Subject: [PATCH] Add capital Y to prompts --- install/alpine-docker-install.sh | 4 ++-- install/docker-install.sh | 4 ++-- install/influxdb-install.sh | 2 +- install/k0s-install.sh | 2 +- install/mariadb-install.sh | 2 +- install/postgresql-install.sh | 2 +- install/scrypted-install.sh | 2 +- misc/alpine-install.func | 2 +- misc/bluetooth.sh | 4 ++-- misc/install.func | 2 +- misc/post-pbs-install.sh | 14 +++++++------- misc/pyenv.sh | 6 +++--- 12 files changed, 23 insertions(+), 23 deletions(-) diff --git a/install/alpine-docker-install.sh b/install/alpine-docker-install.sh index 368a4d3f..38c12bb8 100644 --- a/install/alpine-docker-install.sh +++ b/install/alpine-docker-install.sh @@ -34,7 +34,7 @@ PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose") read -r -p "Would you like to add Portainer? " prompt -if echo "$prompt" | grep -Eq "^(y|yes)$"; then +if echo "$prompt" | grep -Eq "^(y|yes|Y)$"; then msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" docker volume create portainer_data >/dev/null $STD docker run -d \ @@ -49,7 +49,7 @@ if echo "$prompt" | grep -Eq "^(y|yes)$"; then fi read -r -p "Would you like to add Docker Compose? " prompt -if echo "$prompt" | grep -Eq "^(y|yes)$"; then +if echo "$prompt" | grep -Eq "^(y|yes|Y)$"; then msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} mkdir -p $DOCKER_CONFIG/cli-plugins diff --git a/install/docker-install.sh b/install/docker-install.sh index 8240ed8f..e4959871 100644 --- a/install/docker-install.sh +++ b/install/docker-install.sh @@ -44,7 +44,7 @@ $STD sh <(curl -sSL https://get.docker.com) msg_ok "Installed Docker $DOCKER_LATEST_VERSION" read -r -p "Would you like to add Portainer? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" docker volume create portainer_data >/dev/null $STD docker run -d \ @@ -59,7 +59,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then fi read -r -p "Would you like to add Docker Compose? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION" DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} mkdir -p $DOCKER_CONFIG/cli-plugins diff --git a/install/influxdb-install.sh b/install/influxdb-install.sh index b1683824..86555dc9 100644 --- a/install/influxdb-install.sh +++ b/install/influxdb-install.sh @@ -48,7 +48,7 @@ $STD systemctl enable --now influxdb msg_ok "Installed InfluxDB" read -r -p "Would you like to add Telegraf? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then msg_info "Installing Telegraf" $STD apt-get install -y telegraf msg_ok "Installed Telegraf" diff --git a/install/k0s-install.sh b/install/k0s-install.sh index 323bbebe..18389d6c 100644 --- a/install/k0s-install.sh +++ b/install/k0s-install.sh @@ -29,7 +29,7 @@ k0s config create > /etc/k0s/k0s.yaml msg_ok "Installed k0s Kubernetes" read -r -p "Would you like to add Helm Package Manager? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then msg_info "Installing Helm" $STD bash <(curl -sSLf https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3) msg_ok "Installed Helm" diff --git a/install/mariadb-install.sh b/install/mariadb-install.sh index 3fefa9b1..ebc311f8 100644 --- a/install/mariadb-install.sh +++ b/install/mariadb-install.sh @@ -26,7 +26,7 @@ $STD apt-get install -y mariadb-server msg_ok "Installed MariaDB" read -r -p "Would you like to add Adminer? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then msg_info "Installing Adminer" $STD apt install -y adminer $STD a2enconf adminer diff --git a/install/postgresql-install.sh b/install/postgresql-install.sh index 5f455031..d0085ccc 100644 --- a/install/postgresql-install.sh +++ b/install/postgresql-install.sh @@ -133,7 +133,7 @@ sudo systemctl restart postgresql msg_ok "Installed PostgreSQL" read -r -p "Would you like to add Adminer? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then msg_info "Installing Adminer" $STD apt install -y adminer $STD sudo a2enconf adminer diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index b1df07e1..3d328b90 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -77,7 +77,7 @@ $STD python3 -m pip install aiofiles debugpy typing_extensions typing msg_ok "Installed Python3" read -r -p "Would you like to add Coral Edge TPU support? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then msg_info "Adding Coral Edge TPU Support" $STD apt-key add <(curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg) sh -c 'echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" > /etc/apt/sources.list.d/coral-edgetpu.list' diff --git a/misc/alpine-install.func b/misc/alpine-install.func index ce38abed..484d1357 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -86,7 +86,7 @@ network_check() { 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? " prompt - if echo "$prompt" | grep -Eq "^(y|yes)$"; then + if echo "$prompt" | grep -Eq "^(y|yes|Y)$"; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/misc/bluetooth.sh b/misc/bluetooth.sh index d3a3ca60..dd4332d0 100644 --- a/misc/bluetooth.sh +++ b/misc/bluetooth.sh @@ -41,7 +41,7 @@ clear EOF read -r -p "Switch from dbus-daemon to dbus-broker? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then cat <>/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? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then apt-get -t bullseye-backports install -y bluez* &>/dev/null fi echo -e "Finished, reboot for changes to take affect" diff --git a/misc/install.func b/misc/install.func index ca112b9e..2699f82e 100644 --- a/misc/install.func +++ b/misc/install.func @@ -94,7 +94,7 @@ network_check() { 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? " prompt - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" else echo -e " 🖧 Check Network Settings" diff --git a/misc/post-pbs-install.sh b/misc/post-pbs-install.sh index 39a0a320..0aa288d3 100644 --- a/misc/post-pbs-install.sh +++ b/misc/post-pbs-install.sh @@ -58,7 +58,7 @@ function msg_ok() { clear header_info read -r -p "Disable Enterprise Repository? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then msg_info "Disabling Enterprise Repository" sleep 2 sed -i "s/^deb/#deb/g" /etc/apt/sources.list.d/pbs-enterprise.list @@ -66,7 +66,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then fi read -r -p "Add/Correct PBS Sources (sources.list)? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then msg_info "Adding or Correcting PBS Sources" cat </etc/apt/sources.list deb http://ftp.debian.org/debian bullseye main contrib @@ -78,7 +78,7 @@ EOF fi read -r -p "Enable No-Subscription Repository? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then msg_info "Enabling No-Subscription Repository" cat <>/etc/apt/sources.list deb http://download.proxmox.com/debian/pbs bullseye pbs-no-subscription @@ -88,7 +88,7 @@ EOF fi read -r -p "Add (Disabled) Beta/Test Repository? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then msg_info "Adding Beta/Test Repository and set disabled" cat <>/etc/apt/sources.list # deb http://download.proxmox.com/debian/pbs bullseye pbstest @@ -98,7 +98,7 @@ EOF fi read -r -p "Disable Subscription Nag? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then msg_info "Disabling Subscription Nag" echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script apt --reinstall install proxmox-widget-toolkit &>/dev/null @@ -106,7 +106,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then fi read -r -p "Update Proxmox Backup Server now? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then msg_info "Updating Proxmox Backup Server (Patience)" apt-get update &>/dev/null apt-get -y dist-upgrade &>/dev/null @@ -114,7 +114,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then fi read -r -p "Reboot Proxmox Backup Server now? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then msg_info "Rebooting Proxmox Backup Server" sleep 2 msg_ok "Completed Post Install Routines" diff --git a/misc/pyenv.sh b/misc/pyenv.sh index 675a0344..185c4867 100644 --- a/misc/pyenv.sh +++ b/misc/pyenv.sh @@ -69,7 +69,7 @@ pyenv install 3.11.1 &>/dev/null pyenv global 3.11.1 msg_ok "Installed Python 3.11.1" read -r -p "Would you like to install Home Assistant Beta? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then msg_info "Installing Home Assistant Beta" cat </etc/systemd/system/homeassistant.service [Unit] @@ -98,7 +98,7 @@ hass fi read -r -p "Would you like to install ESPHome Beta? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then msg_info "Installing ESPHome Beta" mkdir /srv/esphome cd /srv/esphome @@ -140,7 +140,7 @@ exec $SHELL fi read -r -p "Would you like to install Matter-Server (Beta)? " prompt -if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then msg_info "Installing Matter Server" apt-get install -y \ libcairo2-dev \