projects
/
project
/
libubox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sh/jshn.sh: fix json_get_var() and json_get_type() to not return cached values
[project/libubox.git]
/
sh
/
jshn.sh
diff --git
a/sh/jshn.sh
b/sh/jshn.sh
index
a15cb00
..
0f209d3
100644
(file)
--- a/
sh/jshn.sh
+++ b/
sh/jshn.sh
@@
-95,13
+95,13
@@
json_dump() {
json_get_type() {
local dest="$1"
local var="TYPE_${JSON_CUR}_$2"
json_get_type() {
local dest="$1"
local var="TYPE_${JSON_CUR}_$2"
- eval "
[ -n \"\${$var+x}\" ] && export -- \"$dest=\${$var}\"
"
+ eval "
export -- \"$dest=\${$var}\"; [ -n \"\${$var+x}\" ]
"
}
json_get_var() {
local dest="$1"
local var="${JSON_CUR}_${2//[^a-zA-Z0-9_]/_}"
}
json_get_var() {
local dest="$1"
local var="${JSON_CUR}_${2//[^a-zA-Z0-9_]/_}"
- eval "
[ -n \"\${$var+x}\" ] && export -- \"$dest=\${$var}\"
"
+ eval "
export -- \"$dest=\${$var}\"; [ -n \"\${$var+x}\" ]
"
}
json_get_vars() {
}
json_get_vars() {