NAME=Open Media Library Open Media Library.dmg: rm -rf "${NAME}.dmg" dist xcodebuild -project "Open Media Library.xcodeproj" -scheme "Open Media Library" DSTROOT="./dist" archive ln -s /Applications "dist/Applications/Applications" hdiutil create -srcfolder "dist/Applications" -volname "${NAME}" -format UDZO "dist/${NAME}.dmg" hdiutil convert -format UDZO -imagekey zlib-level=9 -o "${NAME}.dmg" "dist/${NAME}.dmg" rm -rf dist