added tools and common

This commit is contained in:
Jonas Forsberg
2022-07-07 19:09:57 +02:00
parent e12c1cfadf
commit e97d09e7d9
2 changed files with 92 additions and 0 deletions

16
.functions/common.sh Normal file
View 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
}