Commit af7925d8 authored by Bingwu Zhang's avatar Bingwu Zhang Committed by Masahiro Yamada
Browse files

kbuild: Abort make on install failures



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: default avatarZhang Bingwu <xtexchooser@duck.com>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 3c2f84ce
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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"
+2 −0
Original line number Diff line number Diff line
@@ -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
+2 −0
Original line number Diff line number Diff line
@@ -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
+2 −0
Original line number Diff line number Diff line
@@ -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
+2 −0
Original line number Diff line number Diff line
@@ -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"
Loading