Skip to content

Instantly share code, notes, and snippets.

@NoobsArePeople2
Last active August 29, 2015 14:01
Show Gist options
  • Save NoobsArePeople2/94126a4e7a7d8a319449 to your computer and use it in GitHub Desktop.
Save NoobsArePeople2/94126a4e7a7d8a319449 to your computer and use it in GitHub Desktop.
Helper script for packaging a Mac app in a DMG
#!/usr/bin/env bash
curr="$( cd "$( dirname "$0" )" && pwd )"
# Project Root
root="$(dirname "$curr" )"
# Where to dump the dmg
bin="$root/bin/mac"
app_name="MyAwesomeApp"
dmg=$bin"/$app_name.dmg"
app=$bin"/$app_name.app"
background=$curr"/dmg_background.png"
volume_name="$app_name"
icon=""
echo ""
echo "Generating .dmg: "$dmg
echo ""
test -f $dmg && rm $dmg
$curr"/create-dmg.sh" --window-size 500 300 --background $background --icon-size 96 --volname $volume_name --icon $volume_name 154 110 --app-drop-link 346 176 $dmg $app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment