diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-05-30 23:47:43 +0400 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-05-30 23:47:43 +0400 |
commit | 0608d1299546d4af1facc271a090cb2abb8c6105 (patch) | |
tree | dc5dccdc7b2a1764857f9cab64de7ad18b7f126e /sh | |
parent | c0b8aaab1a69c64f82d71371153bd201043141e4 (diff) |
sh/jshn.sh: fix json_get_var() and json_get_type() to not return cached values
Diffstat (limited to 'sh')
-rw-r--r-- | sh/jshn.sh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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() { |