From 2884bf9c18b04a68ead5811b4b825fb5417ea66d Mon Sep 17 00:00:00 2001 From: Ryan Amos <49767442+rbamos@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:09:07 -0400 Subject: [PATCH] Non-interactive option --- setup.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup.sh b/setup.sh index b0e61e2..3ec2445 100755 --- a/setup.sh +++ b/setup.sh @@ -114,11 +114,17 @@ else [[ "$kernel_name" == "Linux" ]] fi curl -fsSL https://deb.nodesource.com/setup_22.x -o ~/Downloads/nodesource_setup.sh sudo bash ~/Downloads/nodesource_setup.sh + sudo apt install -y nodejs sudo apt install -y npm sudo npm install -g @noovolari/leapp-cli # brew install Noovolari/brew/leapp-cli fi +# If NON_INTERACTIVE = 1, exit the script +if [[ "${NON_INTERACTIVE}" -eq 1 ]]; then + exit +fi + # Check if the user wants to continue while true; do read -p "Leapp has been installed. This script will now configure Leapp. Do you wish to continue? [Yes / No] " yn