build(install.sh): added prompt_yes_or_no back

This commit is contained in:
2025-07-29 12:25:42 -04:00
parent 5d516c2544
commit 1e11533ba9

View File

@@ -98,6 +98,20 @@ vercomp() {
return 0
}
# Prompt the user for a yes/no answer.
prompt_yes_no() {
local prompt_msg="$1"
local answer
while true; do
read -p "$(echo -e "${YELLOW}${prompt_msg}${NC}") " answer
case "$answer" in
[Yy]* ) return 0;;
[Nn]* ) return 1;;
* ) echo "Please answer yes or no.";;
esac
done
}
# Show the help message and exit.
show_help() {