Longer variable names

This commit is contained in:
Bob Mottram 2016-10-11 15:07:02 +01:00
parent 67b515d24b
commit ab5fc8ca9d
1 changed files with 8 additions and 8 deletions

View File

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