Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-05-14 02:21:12 +0400
committerFelix Fietkau <nbd@openwrt.org>2012-05-14 02:21:12 +0400
commit97ed91fa77e3e2926bab3e70955a0e2b511db86e (patch)
tree285feaaa03fae15956b04e5a0b40ea43e92c1ff8 /sh/jshn.sh
parentf8d3e57b45170a612fc4209d86ffbd410994ccac (diff)
jshn.sh: add json_get_vars() wrapper function
Diffstat (limited to 'sh/jshn.sh')
-rw-r--r--sh/jshn.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/sh/jshn.sh b/sh/jshn.sh
index d325460..117da67 100644
--- 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