Files
nocodb/docker-compose/full-install/sbin/util.sh
2024-02-09 10:37:51 +05:30

19 lines
348 B
Bash

#!/bin/bash
# this file contains the utility functions
# used during installation
#
asksure() {
echo -n "Are you sure (Y/N)? "
while read -r -n 1 -s answer; do
if [[ $answer = [YyNn] ]]; then
[[ $answer = [Yy] ]] && retval=0
[[ $answer = [Nn] ]] && retval=1
break
fi
done
echo # just a final linefeed, optics...
return $retval
}