move questions in the while loop

This commit is contained in:
Jérémy Lecour 2019-03-09 21:59:37 +01:00
parent 1bfe7c4b86
commit cf05263adb

View file

@ -346,10 +346,9 @@ if [ "${INTERACTIVE}" = "1" ]; then
echo ""
y="Y"; n="n"
question="Do you want to commit the changes? [${y}${n}] "
answer=""
while true; do
echo "${question}"
echo "Do you want to commit the changes? [${y}${n}] "
read -r answer
case $answer in
[Yy] )
@ -384,10 +383,9 @@ if [ "${INTERACTIVE}" = "1" ]; then
else
y="y"; n="N"
fi
question="\nDo you want to insert your message into the database? [${y}${n}] "
answer=""
while true; do
echo "${question}"
echo "Do you want to insert your message into the database? [${y}${n}] "
read -r answer
case $answer in
[Yy] )