]> www.infradead.org Git - nvme.git/commitdiff
kbuild: Abort make on install failures
authorZhang Bingwu <xtexchooser@duck.com>
Sun, 14 Jul 2024 08:57:50 +0000 (16:57 +0800)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 20 Jul 2024 04:34:54 +0000 (13:34 +0900)
Setting '-e' flag tells shells to exit with error exit code immediately
after any of commands fails, and causes make(1) to regard recipes as
failed.

Before this, make will still continue to succeed even after the
installation failed, for example, for insufficient permission or
directory does not exist.

Signed-off-by: Zhang Bingwu <xtexchooser@duck.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
arch/arm/boot/install.sh
arch/arm64/boot/install.sh
arch/m68k/install.sh
arch/nios2/boot/install.sh
arch/parisc/install.sh
arch/riscv/boot/install.sh
arch/s390/boot/install.sh
arch/sparc/boot/install.sh
arch/x86/boot/install.sh

index 9ec11fac7d8d63c08b2b17c68e2e123a8c9bc7d9..34e2c6e31fd1fa6893b6f2d2f86725422f971ba7 100755 (executable)
@@ -17,6 +17,8 @@
 #   $3 - kernel map file
 #   $4 - default install path (blank if root directory)
 
+set -e
+
 if [ "$(basename $2)" = "zImage" ]; then
 # Compressed install
   echo "Installing compressed kernel"
index 9b7a09808a3dda64716a83d761c7adb7c779dc5e..cc2f4ccca6c03c5630568efc4f99a95559c5fcd6 100755 (executable)
@@ -17,6 +17,8 @@
 #   $3 - kernel map file
 #   $4 - default install path (blank if root directory)
 
+set -e
+
 if [ "$(basename $2)" = "Image.gz" ] || [ "$(basename $2)" = "vmlinuz.efi" ]
 then
 # Compressed install
index af65e16e5147c4f3954f4680a212e6fd02e96a27..b6829b3942b3f61c05a28ef0fc636b584114cee0 100755 (executable)
@@ -16,6 +16,8 @@
 #   $3 - kernel map file
 #   $4 - default install path (blank if root directory)
 
+set -e
+
 if [ -f $4/vmlinuz ]; then
        mv $4/vmlinuz $4/vmlinuz.old
 fi
index 34a2feec42c8b31d2f90277f6c3b0f2bd652cca3..1161f2bf59eccba2d65afb25c8298b22e92d2936 100755 (executable)
@@ -16,6 +16,8 @@
 #   $3 - kernel map file
 #   $4 - default install path (blank if root directory)
 
+set -e
+
 if [ -f $4/vmlinuz ]; then
        mv $4/vmlinuz $4/vmlinuz.old
 fi
index 933d031c249a1e99f131eeb4ffcffef3266b9363..664c2d77f7764dd8ef03ec1c805bd4ec52f278d3 100755 (executable)
@@ -16,6 +16,8 @@
 #   $3 - kernel map file
 #   $4 - default install path (blank if root directory)
 
+set -e
+
 if [ "$(basename $2)" = "vmlinuz" ]; then
 # Compressed install
   echo "Installing compressed kernel"
index a8df7591513aa04c44c0fb9b4acb9feca6d727e7..4b3d8bf91cc6fcccdfa616ff555a4fafcb93a189 100755 (executable)
@@ -17,6 +17,8 @@
 #   $3 - kernel map file
 #   $4 - default install path (blank if root directory)
 
+set -e
+
 case "${2##*/}" in
 # Compressed install
 Image.*|vmlinuz.efi)
index a13dd2f2aa1cdd04452d14b36fa10924efe1417b..fa41486258ee1143d857a1cce3d7c244a4a72565 100755 (executable)
@@ -15,6 +15,8 @@
 #   $3 - kernel map file
 #   $4 - default install path (blank if root directory)
 
+set -e
+
 echo "Warning: '${INSTALLKERNEL}' command not available - additional " \
      "bootloader config required" >&2
 if [ -f "$4/vmlinuz-$1" ]; then mv -- "$4/vmlinuz-$1" "$4/vmlinuz-$1.old"; fi
index 4f130f3f30d6251bf84da7f9262d2005a15ae661..68de67c5621eab3fc79aadb83dbb28eb261623bf 100755 (executable)
@@ -16,6 +16,8 @@
 #   $3 - kernel map file
 #   $4 - default install path (blank if root directory)
 
+set -e
+
 if [ -f $4/vmlinuz ]; then
        mv $4/vmlinuz $4/vmlinuz.old
 fi
index 0849f4b4274555cf1f1e8d742458ce2199b249e7..93784abcd66d3c16f75f187e45887af96bcb521f 100755 (executable)
@@ -16,6 +16,8 @@
 #   $3 - kernel map file
 #   $4 - default install path (blank if root directory)
 
+set -e
+
 if [ -f $4/vmlinuz ]; then
        mv $4/vmlinuz $4/vmlinuz.old
 fi