appease shellcheck, correct module dependency map name

This commit is contained in:
Joe 2024-02-14 12:41:32 -06:00
parent 48c2d2a0ff
commit 60ccc923bb
Signed by: joe
GPG Key ID: 8595A3F8F2CE1B74
4 changed files with 20 additions and 16 deletions

View File

@ -39,8 +39,8 @@ BuildProject() {
GetModulePaths module_paths
local -a local_paths
mapfile -t local_paths < <(ProcessBuildFile "$target")
paths+=(${module_paths[@]})
paths+=(${local_paths[@]})
paths+=("${module_paths[@]}")
paths+=("${local_paths[@]}")
Log debug "Paths are '${paths[*]}'"
local files

View File

@ -2,9 +2,12 @@ BuildModule() {
Log debug "Got args '$*'"
local module="$1"
local version="$2"
local module_path="${config[module_path]}"
cd "$module_path/${module}/${version}"
local module_path="${config[module_path]}"
local path="$module_path/${module}/${version}"
cd "$path" || {
Log error "Failed to enter module directory '$path' for module '$module'"
return 1
}
linac get && linac build -m "${module}.build"
}

View File

@ -1,7 +1,7 @@
GetModuleDependencies() {
local module_file="${projectName,,}.module"
local -A depends
local -A module_dependencies
if [[ -f "$module_file" ]]; then
. "$module_file" ||
@ -9,19 +9,20 @@ GetModuleDependencies() {
Log error "Failed to load LINAC module file '$module_file'"
return 1
}
Log info "Loaded LINAC module file '$module_file'"
else
Log info "'${projectName}' has no module file, skipping"
return 0
fi
local module
for module in "${!depends[@]}"; do
for module in "${!module_dependencies[@]}"; do
Log debug "$module"
Log debug "${depends[$module]}"
declare -A "$module"'='"${depends[$module]}"
Log debug "${module_dependencies[$module]}"
declare -A "$module"'='"${module_dependencies[$module]}"
done
for module in "${!depends[@]}"; do
for module in "${!module_dependencies[@]}"; do
local -n ref
ref=${module}
local version

View File

@ -3,7 +3,7 @@ GetModulePaths() {
local module_file="${projectName,,}.module"
local -A depends
local -A module_dependencies
if [[ -f "$module_file" ]]; then
. "$module_file" ||
@ -17,13 +17,13 @@ GetModulePaths() {
fi
local module
for module in "${!depends[@]}"; do
for module in "${!module_dependencies[@]}"; do
Log debug "$module"
Log debug "${depends[$module]}"
declare -Ag "$module"'='"${depends[$module]}"
Log debug "${module_dependencies[$module]}"
declare -Ag "$module"'='"${module_dependencies[$module]}"
done
for module in "${!depends[@]}"; do
for module in "${!module_dependencies[@]}"; do
local -n ref
ref=${module}
local version