From feb69e874587a41d6bfc0ea2c37104f4cc19a387 Mon Sep 17 00:00:00 2001 From: Keli Hlodversson Date: Mon, 13 Jul 2015 11:48:23 -0400 Subject: [PATCH] [INTEGRATE] Merging CL#2612583 using UE4-To-UE4-LauncherDev: Let CreateDMG.sh fail on error instead of continuing blindly rb: Wes.Fudala [CL 2618306 by Keli Hlodversson in Main branch] --- Engine/Build/BatchFiles/Mac/CreateDMG.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Engine/Build/BatchFiles/Mac/CreateDMG.sh b/Engine/Build/BatchFiles/Mac/CreateDMG.sh index f4098879d377..e5c93bc972c9 100755 --- a/Engine/Build/BatchFiles/Mac/CreateDMG.sh +++ b/Engine/Build/BatchFiles/Mac/CreateDMG.sh @@ -1,4 +1,8 @@ -#/bin/sh +#!/bin/bash + +# Automatically abort if any command returns a non-zero exit code. +# Append something like "|| true" to the end of the command line if you really need to ignore errors for some reason. +set -e APP_PATH=$(cd "$1" > /dev/null; pwd) APP_SIZE=$(expr $(du -sm "$APP_PATH" | awk '{print $1}') + 500) @@ -82,4 +86,4 @@ test -f "$DMG_PATH" && rm -f "$DMG_PATH" hdiutil convert "$DMG_TEMP_PATH" -format UDZO -imagekey zlib-level=9 -o "$DMG_PATH" > /dev/null rm -f "$DMG_TEMP_PATH" -exit $? +exit 0