Read multiple variables
This commit is contained in:
parent
fe35c30d91
commit
67b515d24b
|
@ -55,11 +55,12 @@ function app_load_variables {
|
||||||
|
|
||||||
var_name=${app_name}_variables
|
var_name=${app_name}_variables
|
||||||
if [ ! ${!var_name} ]; then
|
if [ ! ${!var_name} ]; then
|
||||||
|
echo $"${app_name}_variables was not found"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
varname=${!var_name}
|
eval "varname=(\${$var_name[@]})"
|
||||||
for v in "${var_name[@]}"
|
for v in "${varname[@]}"
|
||||||
do
|
do
|
||||||
read_config_param $v
|
read_config_param $v
|
||||||
done
|
done
|
||||||
|
@ -74,7 +75,7 @@ function app_save_variables {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
varname=${!var_name}
|
eval "varname=(\${$var_name[@]})"
|
||||||
for v in "${varname[@]}"
|
for v in "${varname[@]}"
|
||||||
do
|
do
|
||||||
write_config_param $v "${!v}"
|
write_config_param $v "${!v}"
|
||||||
|
|
Loading…
Reference in New Issue