Merge pull request #1130 from pushytoxin/master

check the return code of customize_image.sh for errors
This commit is contained in:
Igor Pečovnik 2018-10-13 16:38:08 +02:00 committed by GitHub
commit 84f73f0f8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()