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 <apark0006@student.cerritos.edu>
This commit is contained in:
Amy
2023-07-19 20:41:35 -07:00
committed by GitHub
parent 0970c05b05
commit 90dee5520e

View File

@@ -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
# 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