mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
armbian-next: debug_dict()/debug_var() only if debugging
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user