From: Kevin Day Date: Wed, 17 Jul 2019 03:07:13 +0000 (-0500) Subject: Bugfix: variables not being stored in array X-Git-Tag: 0.5.0~533 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=49d376e970d568f550d1d349fc41f39d960f5a0d;p=fll Bugfix: variables not being stored in array Do not directly use string in bash array arguments. More recent versions of bash do not handle this as expected. Move explicit string to a variable and then use that variable to access the array. --- diff --git a/build/scripts/generate.sh b/build/scripts/generate.sh index 660494d..5b40aea 100644 --- a/build/scripts/generate.sh +++ b/build/scripts/generate.sh @@ -206,6 +206,7 @@ generate_id(){ generate_load_settings(){ local failure= local i= + local key= if [[ $settings_file == "" ]] ; then echo -e "${c_error}ERROR: no settings file has been defined.$c_reset" @@ -225,8 +226,9 @@ generate_load_settings(){ done if [[ $project_name == "" ]] ; then - if [[ $variables['project_name'] != "" ]] ; then - project_built="-${variables['project_name']}" + key="project_name" + if [[ ${variables[$key]} != "" ]] ; then + project_built="-${variables[$key]}" fi fi }