armbian_build/lib/functions/main/config-interactive.sh
Ricardo Pardini e49d91ec40 popular demand: bring back KERNEL_CONFIGURE=yes *during image build*
- partially revert 6ef394d95de6a113099caf3d31b668c04dda3862 (thus bring back the TUI/dialog for selecting KERNEL_CONFIGURE=yes/no)
- partially revert d890b418c7107af183b5f1f2a9304923537766c4 (thus bring back the capacity to config & build image in one go)
- stop after configuring kernel, but only if command is `kernel-config`, not regular image-build KERNEL_CONFIGURE=yes
2023-05-09 10:05:09 +02:00

36 lines
1.3 KiB
Bash

#!/usr/bin/env bash
#
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (c) 2013-2023 Igor Pecovnik, igor@armbian.com
#
# This file is a part of the Armbian Build Framework
# https://github.com/armbian/build/
function config_possibly_interactive_kernel_board() {
# if KERNEL_CONFIGURE, BOARD, BRANCH or RELEASE are not set, display selection menu
interactive_config_ask_kernel
[[ -z $KERNEL_CONFIGURE ]] && exit_with_error "No option selected: KERNEL_CONFIGURE"
interactive_config_ask_board_list # this uses get_list_of_all_buildable_boards
[[ -z $BOARD ]] && exit_with_error "No board selected: BOARD"
return 0 # shortcircuit above
}
function config_possibly_interactive_branch_release_desktop_minimal() {
interactive_config_ask_branch
[[ -z $BRANCH ]] && exit_with_error "No kernel branch selected: BRANCH"
[[ ${KERNEL_TARGET} != *${BRANCH}* && ${BRANCH} != "ddk" ]] && exit_with_error "Kernel branch not defined for this board: '${BRANCH}' for '${BOARD}'"
interactive_config_ask_release
# If building image or rootfs (and thus "NEEDS_BINFMT=yes"), then RELEASE must be set.
[[ -z $RELEASE && ${NEEDS_BINFMT} == yes ]] && exit_with_error "No release selected: RELEASE"
interactive_config_ask_desktop_build
interactive_config_ask_standard_or_minimal
return 0 # protect against eventual shortcircuit above
}