Browse Source

Improve askok

bryan 2 years ago
parent
commit
42cbbd43c3
1 changed files with 4 additions and 4 deletions
  1. 4 4
      openwrtbuilder

+ 4 - 4
openwrtbuilder

@@ -663,10 +663,10 @@ fromSource() {
 # Generic helpers
 # Generic helpers
 debug() { (( DEBUG )) && echo "Debug: $*"; }
 debug() { (( DEBUG )) && echo "Debug: $*"; }
 askOk() {
 askOk() {
-    local _response
-    read -r -p "$* [y/N]" _response
-    _response=${_response,,}
-    [[ "$_response" =~ ^(yes|y)$ ]]
+    local r
+    read -r -p "$* [y/N]" r
+    r=${r,,}
+    [[ "$r" =~ ^(yes|y)$ ]]
 }
 }
 extract() {
 extract() {
     debug "${FUNCNAME[0]}"
     debug "${FUNCNAME[0]}"