armbian-next: debug_dict()/debug_var() only if debugging

This commit is contained in:
Ricardo Pardini
2023-02-12 00:18:26 +01:00
parent 7b0f33237d
commit 8f23c9d2e4
2 changed files with 7 additions and 1 deletions

View File

@@ -1,4 +1,7 @@
function debug_dict() {
if [[ "${SHOW_DEBUG}" != "yes" ]]; then
return 0
fi
local dict_name="$1"
declare -n dict="${dict_name}"
for key in "${!dict[@]}"; do
@@ -7,6 +10,9 @@ function debug_dict() {
}
function debug_var() {
if [[ "${SHOW_DEBUG}" != "yes" ]]; then
return 0
fi
local varname="$1"
local -a var_val_array=("${!varname}")
display_alert "${gray_color:-}# ${yellow_color:-}${varname}${normal_color:-}=${bright_yellow_color:-}${var_val_array[*]@Q}${ansi_reset_color:-}" "" "info"

View File

@@ -34,7 +34,7 @@ function main_default_build_packages() {
fi
fi
display_alert "Artifacts to build:" "${artifacts_to_build[*]}" "warn"
display_alert "Artifacts to build:" "${artifacts_to_build[*]}" "debug"
# For each artifact, try to obtain them from the local cache, remote cache, or build them.
# Store info about all artifacts in the process, for later use (eg during package installation in distro-agnostic).