From ab5fc8ca9dbad863fc60d2396a53843794657c80 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 11 Oct 2016 15:07:02 +0100 Subject: [PATCH] Longer variable names --- src/freedombone-utils-selector | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/freedombone-utils-selector b/src/freedombone-utils-selector index 097c141e..d10797cb 100755 --- a/src/freedombone-utils-selector +++ b/src/freedombone-utils-selector @@ -53,14 +53,14 @@ fi function app_load_variables { app_name=$1 - var_name=${app_name}_variables - if [ ! ${!var_name} ]; then + config_var_name=${app_name}_variables + if [ ! ${!config_var_name} ]; then echo $"${app_name}_variables was not found" return fi - eval "varname=(\${$var_name[@]})" - for v in "${varname[@]}" + eval "configvarname=(\${$config_var_name[@]})" + for v in "${configvarname[@]}" do read_config_param $v done @@ -70,13 +70,13 @@ function app_load_variables { function app_save_variables { app_name=$1 - var_name=${app_name}_variables - if [ ! ${!var_name} ]; then + config_var_name=${app_name}_variables + if [ ! ${!config_var_name} ]; then return fi - eval "varname=(\${$var_name[@]})" - for v in "${varname[@]}" + eval "configvarname=(\${$config_var_name[@]})" + for v in "${configvarname[@]}" do write_config_param $v "${!v}" done