Longer variable names
This commit is contained in:
parent
67b515d24b
commit
ab5fc8ca9d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue