diff --git a/lib/ulib/.ulibver b/lib/ulib/.ulibver index c605ea6..9c1e68d 100644 --- a/lib/ulib/.ulibver +++ b/lib/ulib/.ulibver @@ -1 +1 @@ -001003000 +001004000 diff --git a/lib/ulib/compat b/lib/ulib/compat index f7251ab..5d2d87e 100644 --- a/lib/ulib/compat +++ b/lib/ulib/compat @@ -20,17 +20,26 @@ if check_sysinfos -s macosx; then function tolower() { tr A-Z a-z <<<"$*"; } function toupper() { tr a-z A-Z <<<"$*"; } function is_yes() { + case "$1" in + o|oui|y|yes|v|vrai|t|true|on) return 0;; + O|OUI|Y|YES|V|VRAI|T|TRUE|ON) return 0;; + esac + isnum "$1" && [ "$1" -ne 0 ] && return 0 + # pour les perfs, n'utiliser tolower que ici case "$(tolower "$1")" in o|oui|y|yes|v|vrai|t|true|on) return 0;; esac - isnum "$1" && [ "$1" -ne 0 ] && return 0 return 1 } function is_no() { + case "$1" in + n|non|no|f|faux|false|off) return 0;; + N|NON|NO|F|FAUX|FALSE|OFF) return 0;; + esac + isnum "$1" && [ "$1" -eq 0 ] && return 0 case "$(tolower "$1")" in n|non|no|f|faux|false|off) return 0;; esac - isnum "$1" && [ "$1" -eq 0 ] && return 0 return 1 }