Update build.func check if user wants to proceed

This commit is contained in:
Paul 2024-11-26 13:41:34 +13:00 committed by GitHub
parent aa0844cd05
commit 0aa7eb2e9c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,6 +13,13 @@ if [ ! -d "misc" ] || [ ! -d "ct" ] || [ ! -d "install" ] || [ ! -f "README.md"
exit 1 exit 1
fi fi
echo "This script is about to run and will execute."
read -p "Do you understand and want to proceed? (y/n): " CONFIRM
if [[ "$CONFIRM" != "y" && "$CONFIRM" != "Y" ]]; then
echo "Exiting. Script was not executed."
exit 0
fi
variables() { variables() {
NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces. NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces.
var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP. var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP.