From 27576265af9ea2dd6d42c60640b7b3a12786ea41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9la=20Becker?= Date: Fri, 12 Oct 2018 16:07:39 +0200 Subject: [PATCH] check the return code of customize_image.sh for errors --- lib/image-helpers.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/image-helpers.sh b/lib/image-helpers.sh index a99163effb..3f1ac16caa 100644 --- a/lib/image-helpers.sh +++ b/lib/image-helpers.sh @@ -113,8 +113,12 @@ customize_image() mount -o bind,ro $SRC/userpatches/overlay $SDCARD/tmp/overlay display_alert "Calling image customization script" "customize-image.sh" "info" chroot $SDCARD /bin/bash -c "/tmp/customize-image.sh $RELEASE $LINUXFAMILY $BOARD $BUILD_DESKTOP" + CUSTOMIZE_IMAGE_RC=$? umount $SDCARD/tmp/overlay mountpoint -q $SDCARD/tmp/overlay || rm -r $SDCARD/tmp/overlay + if [[ $CUSTOMIZE_IMAGE_RC != 0 ]]; then + exit_with_error "customize-image.sh exited with error (rc: $CUSTOMIZE_IMAGE_RC)" + fi } ############################################################################# install_deb_chroot()