rename internal variables in json_get_type
Signed-off-by: Luka Perkov <luka@openwrt.org>
This commit is contained in:
parent
c360ec576c
commit
220958b7d9
1 changed files with 5 additions and 5 deletions
10
sh/jshn.sh
10
sh/jshn.sh
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue