diff --git a/scripts/package_mac.sh b/scripts/package_mac.sh index beb6fa0f5..c17279c86 100755 --- a/scripts/package_mac.sh +++ b/scripts/package_mac.sh @@ -115,9 +115,8 @@ if [ "$MODE" == "app-store" ]; then cp "$SIGNED/UTM.pkg" "$OUTPUT/UTM.pkg" else rm -f "$OUTPUT/UTM.dmg" - command -v appdmg >/dev/null 2>&1 - if [ $? -eq 0 ]; then - RESOURCES="/tmp/resources.$$" + if ( command -v appdmg >/dev/null 2>&1 ); then + RESOURCES="/tmp/resources.$$" cp -r "$BASEDIR/resources" "$RESOURCES" sed -i '' "s/\/tmp\/signed\/UTM.app/\/tmp\/signed.$$\/UTM.app/g" "$RESOURCES/appdmg.json" appdmg "$RESOURCES/appdmg.json" "$OUTPUT/UTM.dmg"