From bcc6d4c633ee8aebdca29f8cd4413e8931fa3f48 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 9 Nov 2016 15:49:44 +0000 Subject: scripts/mkimage.sh: exit early on error --- scripts/mkimage.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/mkimage.sh b/scripts/mkimage.sh index 2490a87f43..b72b203338 100644 --- a/scripts/mkimage.sh +++ b/scripts/mkimage.sh @@ -113,6 +113,7 @@ build_section() { else rm -rf "$DESTDIR" _fail="yes" + return 1 fi fi fi @@ -134,7 +135,7 @@ build_profile() { # Collect list of needed sections, and make sure they are built for SECTION in $all_sections; do - section_$SECTION + section_$SECTION || return 1 done [ "$_fail" = "no" ] || return 1 @@ -163,7 +164,7 @@ build_profile() { if [ "$_dirty" = "yes" -o ! -e "$output_filename" ]; then # Create image output_format="${image_ext//[:\.]/}" - create_image_${output_format} || _fail="yes" + create_image_${output_format} || { _fail="yes"; false; } if [ "$_checksum" = "yes" ]; then for _c in $all_checksums; do @@ -221,6 +222,6 @@ for ARCH in $req_arch; do abuild-apk update --root "$APKROOT" for PROFILE in $req_profiles; do - (build_profile) + (build_profile) || exit 1 done done -- cgit v1.2.3