fix(scripts): use portable lowercase in normalize_bool for Bash 3.2 (#1493)

This commit is contained in:
Florent BENOIT
2026-05-21 07:15:07 -07:00
committed by GitHub
parent c143c81fbf
commit b93a3d8661
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -58,7 +58,9 @@ normalize_arch() {
}
normalize_bool() {
case "${1,,}" in
local val
val="$(printf '%s' "$1" | tr '[:upper:]' '[:lower:]')"
case "${val}" in
1|true|yes|on) echo "true" ;;
0|false|no|off) echo "false" ;;
*)
+3 -1
View File
@@ -59,7 +59,9 @@ infer_snap_arch() {
}
normalize_bool() {
case "${1,,}" in
local val
val="$(printf '%s' "$1" | tr '[:upper:]' '[:lower:]')"
case "${val}" in
1 | true | yes | on) echo "1" ;;
0 | false | no | off) echo "0" ;;
*)