From e9dd64112cbb6582a931546d9f451a5f91c84601 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Thu, 4 Jan 2018 04:16:43 +0000 Subject: Really exit on error Incorrect code noticed in a comment on mga#22266 --- tools/mdkinst_stage2_tool | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/mdkinst_stage2_tool b/tools/mdkinst_stage2_tool index c1ef5d151..0019ffc86 100755 --- a/tools/mdkinst_stage2_tool +++ b/tools/mdkinst_stage2_tool @@ -36,7 +36,10 @@ if [ $ACTION = "--compress" ]; then [ -d "$LIVE_DIR" ] || error echo "Creating $COMPRESSED_IMAGE from $LIVE_DIR" rm -f $STAGE2_DIR/.room - mksquashfs $LIVE_DIR $COMPRESSED_IMAGE -all-root -noappend >/dev/null || { echo "mksquashfs failed"; exit 1; } + if ! mksquashfs $LIVE_DIR $COMPRESSED_IMAGE -all-root -noappend >/dev/null; then + echo "mksquashfs failed" + exit 1 + fi chmod 755 $COMPRESSED_IMAGE echo foo > $STAGE2_DIR/.room if [ -s $STAGE2_DIR/.room ]; then -- cgit v1.2.1