projects
/
oweals
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0b8aaa
)
sh/jshn.sh: fix json_get_var() and json_get_type() to not return cached values
author
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 30 May 2012 19:47:43 +0000
(21:47 +0200)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 30 May 2012 19:47:43 +0000
(21:47 +0200)
sh/jshn.sh
patch
|
blob
|
history
diff --git
a/sh/jshn.sh
b/sh/jshn.sh
index a15cb00be9f7410e6a2984f6827e666fd1e48f50..0f209d3d77d3cc0d434ca895c9971b52e0d66382 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"
- 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_]/_}"
- eval "
[ -n \"\${$var+x}\" ] && export -- \"$dest=\${$var}\"
"
+ eval "
export -- \"$dest=\${$var}\"; [ -n \"\${$var+x}\" ]
"
}
json_get_vars() {