commit:     c09d959757ab97a50b9af373b975f7b7c4ecf99a
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 23 19:05:02 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Jul 23 19:06:30 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=c09d9597

gen_determineargs.sh: determine_real_args(): Try to create $KERNEL_OUTPUTDIR 
when $KERNEL_DIR != $KERNEL_OUTPUTDIR

That's typically the case when user has set --kernel-outputdir option.

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 gen_determineargs.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gen_determineargs.sh b/gen_determineargs.sh
index a82fb0a..549fb59 100755
--- a/gen_determineargs.sh
+++ b/gen_determineargs.sh
@@ -459,6 +459,12 @@ determine_real_args() {
 
        if isTrue "${BUILD_KERNEL}"
        then
+               if [ "${KERNEL_DIR}" != "${KERNEL_OUTPUTDIR}" -a ! -d 
"${KERNEL_OUTPUTDIR}" ]
+               then
+                       print_warning 3 "Set --kernel-outputdir 
'${KERNEL_OUTPUTDIR}' does not exist; Will try to create ..."
+                       mkdir -p "${KERNEL_OUTPUTDIR}" || gen_die "Failed to 
create '${KERNEL_OUTPUTDIR}'!"
+               fi
+
                if [ -n "${KERNEL_LOCALVERSION}" ]
                then
                        case "${KERNEL_LOCALVERSION}" in

Reply via email to