From 90dee5520ec85c07bf933efae574fc57b9a82a84 Mon Sep 17 00:00:00 2001 From: Amy Date: Wed, 19 Jul 2023 20:41:35 -0700 Subject: [PATCH] install.sh: allow user to continue without dependencies There is currently a comment indicating a potential future implementation of a system to allow users on unsupported operating systems to continue without all necessary dependencies installed. This patch implements that feature. Signed-off-by: Amy Parker --- install.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 25adb31..bbcf464 100644 --- a/install.sh +++ b/install.sh @@ -90,10 +90,17 @@ elif [ "${ID}" = "arch" ] || [ "${UPSTREAM_ID}" = "arch" ]; then sudo pacman -S ${PREREQ} ${PREREQARCH} else echo "Unsupported OS" - # here you could ask the user for permission to try and install anyway - # if they say yes, then do the install - # if they say no, exit the script - exit 1 + # give them the option to continue + echo -n "Would you like to continue? Dependencies may not be satisfied... [y/n] " + read continue_no_dependencies + if [ $continue_no_dependencies == "y" ]; then + echo "Continuing..." + elif [ $continue_no_dependencies != "n" ]; then + echo "Invalid answer, exiting." + exit 1 + else + exit 1 + fi fi # Choice for DNS or IP