rename internal variables in json_get_type

Signed-off-by: Luka Perkov <luka@openwrt.org>
This commit is contained in:
Luka Perkov 2013-01-08 10:48:01 +01:00 committed by Felix Fietkau
parent c360ec576c
commit 220958b7d9

View file

@ -193,12 +193,12 @@ json_dump() {
} }
json_get_type() { json_get_type() {
local dest="$1" local __dest="$1"
local cur local __cur
_json_get_var cur JSON_CUR _json_get_var __cur JSON_CUR
local var="${JSON_PREFIX}TYPE_${cur}_${2//[^a-zA-Z0-9_]/_}" local __var="${JSON_PREFIX}TYPE_${__cur}_${2//[^a-zA-Z0-9_]/_}"
eval "export -- \"$dest=\${$var}\"; [ -n \"\${$var+x}\" ]" eval "export -- \"$__dest=\${$__var}\"; [ -n \"\${$__var+x}\" ]"
} }
json_get_var() { json_get_var() {