added tools and common
This commit is contained in:
16
.functions/common.sh
Normal file
16
.functions/common.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user