kbuild: Create INSTALL_PATH directory if it does not exist

If INSTALL_PATH is not a valid directory, create it, like what
modules_install and dtbs_install will do in the same situation.

Signed-off-by: Zhang Bingwu <xtexchooser@duck.com>
Reviewed-by: Nicolas Schier <nicolas@jasle.eu>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
Zhang Bingwu 2024-07-14 16:57:51 +08:00 committed by Masahiro Yamada
parent af7925d820
commit 7efcb39e0d

View File

@ -20,6 +20,10 @@ do
fi fi
done done
if [ -n "${INSTALL_PATH}" ] && ! [ -e "${INSTALL_PATH}" ]; then
mkdir -p "${INSTALL_PATH}"
fi
# User/arch may have a custom install script # User/arch may have a custom install script
for file in "${HOME}/bin/${INSTALLKERNEL}" \ for file in "${HOME}/bin/${INSTALLKERNEL}" \
"/sbin/${INSTALLKERNEL}" \ "/sbin/${INSTALLKERNEL}" \