From 0a017e055bcc978a721de6ad1b17c789188f59d5 Mon Sep 17 00:00:00 2001 From: sfaber34 Date: Tue, 11 Jun 2024 12:58:26 -0600 Subject: [PATCH] Fix for install confirm function --- packages/nextjs/public/runBuidlGuidlClient.sh | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/nextjs/public/runBuidlGuidlClient.sh b/packages/nextjs/public/runBuidlGuidlClient.sh index 2205a5d..08e7b2f 100755 --- a/packages/nextjs/public/runBuidlGuidlClient.sh +++ b/packages/nextjs/public/runBuidlGuidlClient.sh @@ -79,16 +79,19 @@ if [ "$os_name" = "Linux" ]; then echo -e "\n✅ Node is installed. Version:" node -v else - if confirm "\n❓ Node is not installed. Do you want to install it?"; then - echo -e "\n💪 Installing Node.js" - cd ~ - curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - - sudo apt install -y nodejs + read -r -p "❓ Node is not installed. Do you want to install it? [y/N] " -n 1 + if [[ "$REPLY" =~ ^[Yy]$ ]]; then + echo -e "\n💪 Installing Node" + cd ~ + curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - + sudo apt install -y nodejs else echo -e "\n👎 Node installation canceled." fi fi + exit + if command -v npm >/dev/null 2>&1; then echo -e "\n✅ NPM is installed. Version:" npm -v @@ -192,9 +195,10 @@ if [ "$os_name" = "Darwin" ]; then if command -v gpg >/dev/null 2>&1; then echo -e "\n✅ gnupg is installed." else - if confirm "\n❓ gnupg is not installed. Do you want to install it?"; then - echo -e "\n💪 Installing gnupg:" - brew install gnupg + read -r -p "❓ gnupg is not installed. Do you want to install it? [y/N] " -n 1 + if [[ "$REPLY" =~ ^[Yy]$ ]]; then + echo -e "\n💪 Installing gnupg:" + brew install gnupg else echo -e "\n👎 gnupg installation canceled." fi