From 335ca05aaad8d6d2d1a9055d666c02ecfb063552 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Mon, 17 Jul 2017 16:15:30 +0400 Subject: [PATCH] =?UTF-8?q?compatibilit=C3=A9=20avec=20les=20vieilles=20ve?= =?UTF-8?q?rsions=20de=20bash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ulib/base | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ulib/base b/lib/ulib/base index 9b293a3..92db175 100644 --- a/lib/ulib/base +++ b/lib/ulib/base @@ -3516,7 +3516,7 @@ function ask_any() { lf="$(strlower "$f")" [ "$r" == "$lf" ] && return $i if [ -z "$defi" ]; then - [[ "$f" =~ [A-Z] ]] && defi="$i" + [ -z "${f/[A-Z]/}" ] && defi="$i" fi if [ "$lf" == o ]; then case "$r" in o|y|1|v|t) return $i;; esac @@ -3530,7 +3530,8 @@ function ask_any() { else i=0 while [ $i -lt $count ]; do - [[ "${format:$i:1}" =~ [A-Z] ]] && return $i + f="${format:$i:1}" + [ -z "${f/[A-Z]/}" ] && return $i i=$(($i + 1)) done return 0