projects
/
project
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
f8d3e57
)
jshn.sh: add json_get_vars() wrapper function
author
Felix Fietkau
<nbd@openwrt.org>
Sun, 13 May 2012 22:21:12 +0000
(
00:21
+0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Sun, 13 May 2012 22:21:12 +0000
(
00:21
+0200)
sh/jshn.sh
patch
|
blob
|
history
diff --git
a/sh/jshn.sh
b/sh/jshn.sh
index d3254606d3d766f14be34f6e8bfb2d7689d4f7fc..117da67b8b2e6722143a7641df1d20b582226a9b 100644
(file)
--- a/
sh/jshn.sh
+++ b/
sh/jshn.sh
@@
-104,6
+104,13
@@
json_get_var() {
eval "export -- \"$dest=\${${JSON_CUR}_$var}\""
}
+json_get_vars() {
+ while [ "$#" -gt 0 ]; do
+ local _var="$1"; shift
+ json_get_var "$_var" "$_var"
+ done
+}
+
json_select() {
local target="$1"
local type