From ef94f1b931c2fe332e1d9914a55a5374db7b539a Mon Sep 17 00:00:00 2001 From: 5olu7ion Date: Sat, 10 Jun 2023 00:09:02 +0200 Subject: [PATCH] Revert "Add capital Y to prompts" This reverts commit 7a5ebbe866b4ed6c5f73d286ac2c188af3245561. --- 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 38c12bb8..368a4d3f 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|Y)$"; then +if echo "$prompt" | grep -Eq "^(y|yes)$"; 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|Y)$"; then fi read -r -p "Would you like to add Docker Compose? " prompt -if echo "$prompt" | grep -Eq "^(y|yes|Y)$"; then +if echo "$prompt" | grep -Eq "^(y|yes)$"; 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 e4959871..8240ed8f 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|Y)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; 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|Y)$ ]]; then fi read -r -p "Would you like to add Docker Compose? " prompt -if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; 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 86555dc9..b1683824 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|Y)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; 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 18389d6c..323bbebe 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|Y)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; 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 ebc311f8..3fefa9b1 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|Y)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; 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 d0085ccc..5f455031 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|Y)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; 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 3d328b90..b1df07e1 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|Y)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; 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 484d1357..ce38abed 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|Y)$"; then + if echo "$prompt" | grep -Eq "^(y|yes)$"; 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 dd4332d0..d3a3ca60 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|Y)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; 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|Y)$ ]]; 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" diff --git a/misc/install.func b/misc/install.func index 2699f82e..ca112b9e 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|Y)$ ]]; then + if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; 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 0aa288d3..39a0a320 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|Y)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; 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|Y)$ ]]; then fi read -r -p "Add/Correct PBS Sources (sources.list)? " prompt -if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; 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|Y)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; 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|Y)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; 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|Y)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; 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|Y)$ ]]; then fi read -r -p "Update Proxmox Backup Server now? " prompt -if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; 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|Y)$ ]]; then fi read -r -p "Reboot Proxmox Backup Server now? " prompt -if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; 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 185c4867..675a0344 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|Y)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; 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|Y)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; 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|Y)$ ]]; then +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Matter Server" apt-get install -y \ libcairo2-dev \