Skip to content

Commit

Permalink
Update allsky-config.sh: check for invalid response
Browse files Browse the repository at this point in the history
  • Loading branch information
EricClaeys authored Aug 14, 2024
1 parent 102cca5 commit 359320b
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions scripts/utilities/allsky-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,20 @@ if [[ -z ${CMD} ]]; then
RET=$?

[[ ${ALLOW_MORE_COMMANDS} == "false" ]] && exit ${RET}
echo -e "\n\n"
echo -e "${YELLOW}${BOLD}"
echo "=========================================="
echo -n "Press RETURN to continue or 'q' to quit: "
read -r x
echo -e "${NC}"
[[ ${x:0:1} == "q" ]] && exit 0
while true; do
echo -e "\n\n"
echo -e "${YELLOW}${BOLD}"
echo "=========================================="
echo -n "Press RETURN to continue or 'q' to quit: "
read -r x
echo -e "${NC}"
[[ ${x:0:1} == "q" ]] && exit 0
if [[ -n ${x} ]]; then
echo "'${x}' is not a valid response; try again."
else
break
fi
done
done
exit 0

Expand Down

0 comments on commit 359320b

Please sign in to comment.