Read multiple variables

This commit is contained in:
Bob Mottram 2016-10-11 14:56:34 +01:00
parent fe35c30d91
commit 67b515d24b
1 changed files with 4 additions and 3 deletions

View File

@ -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}"