armbian-next: cli: config-dump: can now run on any bash/coreutils-enabled machine; remove some useless vars from dump

This commit is contained in:
Ricardo Pardini 2023-01-04 10:24:49 +01:00
parent c33b59d61b
commit 0e8bddd1e8
No known key found for this signature in database
GPG Key ID: 3D38CA12A66C5D02

View File

@ -1,11 +1,20 @@
function cli_config_dump_pre_run() {
declare -g CONFIG_DEFS_ONLY='yes'
# "gimme root on a Linux machine"
cli_standard_relaunch_docker_or_sudo
}
function cli_config_dump_run() {
# configuration etc - it initializes the extension manager
do_capturing_defs prepare_and_config_main_build_single # this sets CAPTURED_VARS
echo "${CAPTURED_VARS}" # to stdout!
do_capturing_defs config_and_remove_useless < /dev/null # this sets CAPTURED_VARS; the < /dev/null is take away the terminal from stdin
echo "${CAPTURED_VARS}" # to stdout!
}
function config_and_remove_useless() {
prepare_and_config_main_build_single
unset FINALDEST
unset FINAL_HOST_DEPS
unset HOOK_ORDER HOOK_POINT HOOK_POINT_TOTAL_FUNCS
unset REPO_CONFIG REPO_STORAGE
unset DEB_STORAGE
unset RKBIN_DIR
unset ROOTPWD
}