]> www.infradead.org Git - nvme.git/commitdiff
kbuild: Create INSTALL_PATH directory if it does not exist
authorZhang Bingwu <xtexchooser@duck.com>
Sun, 14 Jul 2024 08:57:51 +0000 (16:57 +0800)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 20 Jul 2024 04:34:54 +0000 (13:34 +0900)
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>
scripts/install.sh

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