Skip to content

Instantly share code, notes, and snippets.

@patrickgill
Last active February 11, 2016 23:23
Show Gist options
  • Save patrickgill/b60cb3fb6fbcfc6bcf88 to your computer and use it in GitHub Desktop.
Save patrickgill/b60cb3fb6fbcfc6bcf88 to your computer and use it in GitHub Desktop.
Create a DMG
# Use like this "createdmg.sh foldername"
if (( "$#" != 0 ))
then hdiutil create -volname $1 -fs HFS+ -srcfolder $1 -ov -format UDZO $1.dmg
else
echo "Error: a folder is required to create the dmg file from"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment