Improve askok
This commit is contained in:
@@ -663,10 +663,10 @@ fromSource() {
|
|||||||
# Generic helpers
|
# Generic helpers
|
||||||
debug() { (( DEBUG )) && echo "Debug: $*"; }
|
debug() { (( DEBUG )) && echo "Debug: $*"; }
|
||||||
askOk() {
|
askOk() {
|
||||||
local _response
|
local r
|
||||||
read -r -p "$* [y/N]" _response
|
read -r -p "$* [y/N]" r
|
||||||
_response=${_response,,}
|
r=${r,,}
|
||||||
[[ "$_response" =~ ^(yes|y)$ ]]
|
[[ "$r" =~ ^(yes|y)$ ]]
|
||||||
}
|
}
|
||||||
extract() {
|
extract() {
|
||||||
debug "${FUNCNAME[0]}"
|
debug "${FUNCNAME[0]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user