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.4.3~41 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=4f414802e4af82941172b60a8ee5d7e4fa08ab76;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 }