diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2019-03-28 20:40:58 +0100 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2019-03-28 20:40:58 +0100 |
commit | b3520bca9d33183c173a402af0bd3040a7240959 (patch) | |
tree | 3eeb89df5765ac545fe77b7aaf5d9c931089fb27 /gen_configkernel.sh | |
parent | genkernel: Use isTrue for ARCH_HAVENOPREPARE (diff) | |
download | genkernel-b3520bca9d33183c173a402af0bd3040a7240959.tar.gz genkernel-b3520bca9d33183c173a402af0bd3040a7240959.tar.bz2 genkernel-b3520bca9d33183c173a402af0bd3040a7240959.zip |
determine_config_file(): add some verbose output
...to understand what is happening and why.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gen_configkernel.sh')
-rwxr-xr-x | gen_configkernel.sh | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/gen_configkernel.sh b/gen_configkernel.sh index 582d71f..b7fa63e 100755 --- a/gen_configkernel.sh +++ b/gen_configkernel.sh @@ -3,6 +3,7 @@ # Fills variable KERNEL_CONFIG determine_config_file() { + print_info 2 "Checking for suitable kernel configuration..." for f in \ "${CMD_KERNEL_CONFIG}" \ "/etc/kernels/kernel-config-${ARCH}-${KV}" \ @@ -10,19 +11,26 @@ determine_config_file() { "${GK_SHARE}/arch/${ARCH}/kernel-config-${VER}.${PAT}" \ "${GK_SHARE}/arch/${ARCH}/generated-config" \ "${GK_SHARE}/arch/${ARCH}/kernel-config" \ - "${DEFAULT_KERNEL_CONFIG}" \ - ; do - if [ -n "${f}" -a -f "${f}" ] + "${DEFAULT_KERNEL_CONFIG}" + do + [ -z "${f}" ] && continue + + if [ -f "${f}" ] then - if ! grep -sq THIS_CONFIG_IS_BROKEN "$f" + if grep -sq THIS_CONFIG_IS_BROKEN "$f" then + print_info 2 "$(getIndent 1)- '${f}' is marked as broken; Skipping..." + else KERNEL_CONFIG="$f" && break fi + else + print_info 2 "$(getIndent 1)- '${f}' not found; Skipping..." fi done + if [ -z "${KERNEL_CONFIG}" ] then - gen_die 'Error: No kernel .config specified, or file not found!' + gen_die 'No kernel .config specified, or file not found!' fi KERNEL_CONFIG="$(readlink -f "${KERNEL_CONFIG}")" @@ -30,7 +38,7 @@ determine_config_file() { # Validate the symlink result if any if [ ! -f "${KERNEL_CONFIG}" ] then - gen_die "Error: No kernel .config: symlinked file not found! ($KERNEL_CONFIG)" + gen_die "No kernel .config: symlinked file '$KERNEL_CONFIG' not found!" fi } |