Create a flat, no-payload package in Mac OS X

Lion and Mountain Lion include a new Terminal command to allow creating package files that only contain a script.
To do this, make a Scripts folder and place a “postinstall” script inside this folder. This needs to be a Bash script with #!/bin/bash as the first line.
Next, run the following command to create the package file:

sudo pkgbuild –identifier com.your.id –nopayload –scripts /path/to/scripts/folder /path/to/save/package/name.pkg

References: http://derflounder.wordpress.com/2012/08/15/creating-payload-free-packages-with-pkgbuild/

Be the first to comment

Leave a Reply

Your email address will not be published.


*