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 –nopayload –scripts /path/to/scripts/folder /path/to/save/package/name.pkg


Be the first to comment

Leave a Reply

Your email address will not be published.