17 lines
426 B
Bash
17 lines
426 B
Bash
|
function asktobreak(){
|
||
|
if [[ "$ANSWER_YES" == true ]];then
|
||
|
printf "\n"
|
||
|
return 1
|
||
|
fi
|
||
|
printf "Do you want to run this step (y/n)"
|
||
|
while read -r -n 1 -s answer; do
|
||
|
if [[ $answer == [YyNn] ]];then
|
||
|
[[ $answer == [Yy] ]] && return_value=1
|
||
|
[[ $answer == [Nn] ]] && return_value=0
|
||
|
printf "\n"
|
||
|
break;
|
||
|
fi
|
||
|
done
|
||
|
return $return_value
|
||
|
}
|