Skip to content

Commit

Permalink
Apply recursive confirmation prompt (#735)
Browse files Browse the repository at this point in the history
- Add recursive confirmation prompt
- Allow uppercase or lowercase letters (Y, y, N, n)
  • Loading branch information
hermitkim1 authored Sep 14, 2021
1 parent afbbaf1 commit e39c225
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/testclient/scripts/sequentialFullTest/create-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,20 @@ SECONDS=0

./check-test-config.sh "$@"

read -p 'Confirm the above configuration. Do you want to proceed ? (y/n) : ' CHECKPROCEED
if [ "${CHECKPROCEED}" != "y" ]; then
echo "[Command: $0 $@] has been cancelled. See you soon. :)"
exit 0
fi
while true; do
read -p 'Confirm the above configuration. Do you want to proceed ? (y/n) : ' CHECKPROCEED
case $CHECKPROCEED in
[Yy]* )
break
;;
[Nn]* )
echo "[Command: $0 $@] has been cancelled. See you soon. :)"
exit 1
;;
* )
echo "Please answer yes or no.";;
esac
done

./create-mcir-ns-cloud.sh "$@"

Expand Down

0 comments on commit e39c225

Please sign in to comment.