#!/bin/sh name="Open Media Library" tmp="${name}.tmp.dmg" dmg="${name}.dmg" tmpdir=`mktemp -d -t oml` cp -r "${name}.app" "$tmpdir/" ln -s /Applications "$tmpdir/Applications" rm -rf "$dmg" "$tmp" hdiutil create -srcfolder "$tmpdir" -volname "$name" -format UDZO "$tmp" hdiutil convert -format UDZO -imagekey zlib-level=9 -o "$dmg" "$tmp" rm -rf $tmpdir "$tmp"