armbian-next: repeat build opts: fix missing BOARD, show both after config (for logfile) & after build

This commit is contained in:
Ricardo Pardini
2023-01-27 01:05:16 +01:00
parent 39208d1007
commit 1c00d64b35

View File

@@ -9,16 +9,27 @@ function cli_standard_build_run() {
# configuration etc - it initializes the extension manager; handles its own logging sections
prep_conf_main_build_single
# 1x: show interactively-selected as soon as possible, after config
produce_repeat_args_array
display_alert "Repeat Build Options (early)" "${repeat_args[*]}" "ext"
# the full build. It has its own logging sections.
do_with_default_build full_build_packages_rootfs_and_image
# CLI-specific: how to redo the build.
if armbian_is_running_in_container; then
BUILD_CONFIG='docker' # @TODO: this is not true, CLI handles this differently, gotta ask the CLI; this whole thing is inconsistent
fi
# 1x: show interactively-selected as soon as possible, after config
produce_repeat_args_array
display_alert "Repeat Build Options" "${repeat_args[*]}" "ext" # * = expand array, space delimited, single-word.
# Make it easy to repeat build by displaying build options used. Prepare array. @TODO this is inconsistent. Maybe something like the relaunch vars?
local -a repeat_args=("./compile.sh" "${BUILD_CONFIG}" " BRANCH=${BRANCH}")
}
function produce_repeat_args_array() {
# Make it easy to repeat build by displaying build options used. Prepare array.
declare -a -g repeat_args=("./compile.sh")
# @TODO: missing the config file name, if any.
# @TODO: missing the original cli command, if different from build/docker
[[ -n ${BOARD} ]] && repeat_args+=("BOARD=${BOARD}")
[[ -n ${BOARD} ]] && repeat_args+=("BOARD=${BOARD}")
[[ -n ${BRANCH} ]] && repeat_args+=("BRANCH=${BRANCH}")
[[ -n ${RELEASE} ]] && repeat_args+=("RELEASE=${RELEASE}")
[[ -n ${BUILD_MINIMAL} ]] && repeat_args+=("BUILD_MINIMAL=${BUILD_MINIMAL}")
[[ -n ${BUILD_DESKTOP} ]] && repeat_args+=("BUILD_DESKTOP=${BUILD_DESKTOP}")
@@ -26,8 +37,6 @@ function cli_standard_build_run() {
[[ -n ${KERNEL_CONFIGURE} ]] && repeat_args+=("KERNEL_CONFIGURE=${KERNEL_CONFIGURE}")
[[ -n ${DESKTOP_ENVIRONMENT} ]] && repeat_args+=("DESKTOP_ENVIRONMENT=${DESKTOP_ENVIRONMENT}")
[[ -n ${DESKTOP_ENVIRONMENT_CONFIG_NAME} ]] && repeat_args+=("DESKTOP_ENVIRONMENT_CONFIG_NAME=${DESKTOP_ENVIRONMENT_CONFIG_NAME}")
[[ -n ${DESKTOP_APPGROUPS_SELECTED} ]] && repeat_args+=("DESKTOP_APPGROUPS_SELECTED=\"${DESKTOP_APPGROUPS_SELECTED}\"")
[[ -n ${DESKTOP_APT_FLAGS_SELECTED} ]] && repeat_args+=("DESKTOP_APT_FLAGS_SELECTED=\"${DESKTOP_APT_FLAGS_SELECTED}\"")
[[ -n ${DESKTOP_APPGROUPS_SELECTED} ]] && repeat_args+=("DESKTOP_APPGROUPS_SELECTED=\"${DESKTOP_APPGROUPS_SELECTED:-"none"}\"")
[[ -n ${COMPRESS_OUTPUTIMAGE} ]] && repeat_args+=("COMPRESS_OUTPUTIMAGE=${COMPRESS_OUTPUTIMAGE}")
display_alert "Repeat Build Options" "${repeat_args[*]}" "ext" # * = expand array, space delimited, single-word.
}