kernel-build: Make all errors in the build script fatal

Make any error in the build script fatal, rather than checking for an
error in most places.

Change-Id: Ia043c492e367b500cff02cb7b347182534cc9385
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Joel Stanley <joel@jms.id.au>
diff --git a/kernel-build.sh b/kernel-build.sh
index 5cc4723..931449a 100755
--- a/kernel-build.sh
+++ b/kernel-build.sh
@@ -64,6 +64,7 @@
 #!/bin/bash
 
 set -x
+set -e -o pipefail
 
 cd ${WORKSPACE}
 
@@ -71,22 +72,22 @@
 cd linux
 
 # Record the version in the logs
-powerpc64le-linux-gnu-gcc --version || exit 1
+powerpc64le-linux-gnu-gcc --version
 
 # Build kernel prep
-ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make clean || exit 1
-ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make mrproper || exit 1
+ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make clean
+ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make mrproper
 
 # Build kernel with debug
-ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make pseries_le_defconfig || exit 1
+ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make pseries_le_defconfig
 echo "CONFIG_DEBUG_INFO=y" >> .config
-ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make olddefconfig || exit 1
+ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make olddefconfig
 ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make -j$(nproc) -s C=2 CF=-D__CHECK_ENDIAN__ 2>&1 | gzip > sparse.log.gz
 pahole vmlinux 2>&1 | gzip > structs.dump.gz
 
 # Build kernel
-ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make pseries_le_defconfig || exit 1
-ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make -j$(nproc) || exit 1
+ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make pseries_le_defconfig
+ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make -j$(nproc)
 
 EOF_SCRIPT