From 67b515d24b136284e6abc87e37600b9773122a2d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 11 Oct 2016 14:56:34 +0100 Subject: [PATCH] Read multiple variables --- src/freedombone-utils-selector | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/freedombone-utils-selector b/src/freedombone-utils-selector index c9dfd914..097c141e 100755 --- a/src/freedombone-utils-selector +++ b/src/freedombone-utils-selector @@ -55,11 +55,12 @@ function app_load_variables { var_name=${app_name}_variables if [ ! ${!var_name} ]; then + echo $"${app_name}_variables was not found" return fi - varname=${!var_name} - for v in "${var_name[@]}" + eval "varname=(\${$var_name[@]})" + for v in "${varname[@]}" do read_config_param $v done @@ -74,7 +75,7 @@ function app_save_variables { return fi - varname=${!var_name} + eval "varname=(\${$var_name[@]})" for v in "${varname[@]}" do write_config_param $v "${!v}"