From ea92c55c0c0a33b31a1f2a79de9802dd9634e41b Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Thu, 25 Jun 2020 13:34:31 +0200 Subject: [PATCH] solution for #133 without harm old implemenation --- modules/jsonDB.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/jsonDB.sh b/modules/jsonDB.sh index 289843e..d5a97be 100644 --- a/modules/jsonDB.sh +++ b/modules/jsonDB.sh @@ -332,7 +332,8 @@ function jssh_updateArray_async() { # $1 ARRAY name, must be declared with "declare -A ARRAY" before calling Json2Array() { # shellcheck disable=SC1091,SC1090 - [ -z "$1" ] || source <( printf "$1"'=( %s )' "$(sed -E -n -e '/\["[-0-9a-zA-Z_,."]+"\]\+*\t/ s/\t/=/gp' -e 's/=(true|false)/="\1"/')" ) + [ -z "$1" ] || source <( printf "$1"'=( %s )' "$(sed -E -n -e ':x /"text"\]/ { N; s/([^"])\n/\1\\n/g ; tx }' -e '/\["[-0-9a-zA-Z_,."]+"\]\+*\t/ s/\t/=/gp' -e 's/=(true|false)/="\1"/')" ) +set +x } # get Config Key from jssh file without jsshDB # output ARRAY as JSON.sh style data