mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
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: Zhang Bingwu <xtexchooser@duck.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
3c2f84ceda
commit
af7925d820
@ -17,6 +17,8 @@
|
|||||||
# $3 - kernel map file
|
# $3 - kernel map file
|
||||||
# $4 - default install path (blank if root directory)
|
# $4 - default install path (blank if root directory)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
if [ "$(basename $2)" = "zImage" ]; then
|
if [ "$(basename $2)" = "zImage" ]; then
|
||||||
# Compressed install
|
# Compressed install
|
||||||
echo "Installing compressed kernel"
|
echo "Installing compressed kernel"
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
# $3 - kernel map file
|
# $3 - kernel map file
|
||||||
# $4 - default install path (blank if root directory)
|
# $4 - default install path (blank if root directory)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
if [ "$(basename $2)" = "Image.gz" ] || [ "$(basename $2)" = "vmlinuz.efi" ]
|
if [ "$(basename $2)" = "Image.gz" ] || [ "$(basename $2)" = "vmlinuz.efi" ]
|
||||||
then
|
then
|
||||||
# Compressed install
|
# Compressed install
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
# $3 - kernel map file
|
# $3 - kernel map file
|
||||||
# $4 - default install path (blank if root directory)
|
# $4 - default install path (blank if root directory)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
if [ -f $4/vmlinuz ]; then
|
if [ -f $4/vmlinuz ]; then
|
||||||
mv $4/vmlinuz $4/vmlinuz.old
|
mv $4/vmlinuz $4/vmlinuz.old
|
||||||
fi
|
fi
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
# $3 - kernel map file
|
# $3 - kernel map file
|
||||||
# $4 - default install path (blank if root directory)
|
# $4 - default install path (blank if root directory)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
if [ -f $4/vmlinuz ]; then
|
if [ -f $4/vmlinuz ]; then
|
||||||
mv $4/vmlinuz $4/vmlinuz.old
|
mv $4/vmlinuz $4/vmlinuz.old
|
||||||
fi
|
fi
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
# $3 - kernel map file
|
# $3 - kernel map file
|
||||||
# $4 - default install path (blank if root directory)
|
# $4 - default install path (blank if root directory)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
if [ "$(basename $2)" = "vmlinuz" ]; then
|
if [ "$(basename $2)" = "vmlinuz" ]; then
|
||||||
# Compressed install
|
# Compressed install
|
||||||
echo "Installing compressed kernel"
|
echo "Installing compressed kernel"
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
# $3 - kernel map file
|
# $3 - kernel map file
|
||||||
# $4 - default install path (blank if root directory)
|
# $4 - default install path (blank if root directory)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
case "${2##*/}" in
|
case "${2##*/}" in
|
||||||
# Compressed install
|
# Compressed install
|
||||||
Image.*|vmlinuz.efi)
|
Image.*|vmlinuz.efi)
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
# $3 - kernel map file
|
# $3 - kernel map file
|
||||||
# $4 - default install path (blank if root directory)
|
# $4 - default install path (blank if root directory)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
echo "Warning: '${INSTALLKERNEL}' command not available - additional " \
|
echo "Warning: '${INSTALLKERNEL}' command not available - additional " \
|
||||||
"bootloader config required" >&2
|
"bootloader config required" >&2
|
||||||
if [ -f "$4/vmlinuz-$1" ]; then mv -- "$4/vmlinuz-$1" "$4/vmlinuz-$1.old"; fi
|
if [ -f "$4/vmlinuz-$1" ]; then mv -- "$4/vmlinuz-$1" "$4/vmlinuz-$1.old"; fi
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
# $3 - kernel map file
|
# $3 - kernel map file
|
||||||
# $4 - default install path (blank if root directory)
|
# $4 - default install path (blank if root directory)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
if [ -f $4/vmlinuz ]; then
|
if [ -f $4/vmlinuz ]; then
|
||||||
mv $4/vmlinuz $4/vmlinuz.old
|
mv $4/vmlinuz $4/vmlinuz.old
|
||||||
fi
|
fi
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
# $3 - kernel map file
|
# $3 - kernel map file
|
||||||
# $4 - default install path (blank if root directory)
|
# $4 - default install path (blank if root directory)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
if [ -f $4/vmlinuz ]; then
|
if [ -f $4/vmlinuz ]; then
|
||||||
mv $4/vmlinuz $4/vmlinuz.old
|
mv $4/vmlinuz $4/vmlinuz.old
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user