How to fix the Growl installer for an InstaDMG Workflow

Growl’s installer helpfully includes a postflight script that opens up the System Preferences app so that you can configure the Growl options. This is generally what you want most of the time, but not all the time.

If you’re installing Growl through something like ARD, or using an InstaDMG workflow it’s annoying to have the System Preferences app come up when Growl is being installed.

It used to be relatively easy to fix this as Growl was in a package bundle, but now it’s distributed as a flat package. Fortunately, it’s pretty easy to expand a flat package, edit the necessary postflight script and compress it all back together again:

pkgutil --expand Growl.pkg Growl

Edit Growl/growl.pkg/Scripts/postflight and change it to the following (add the first and last lines)

if [ "$3" = "/" ]; then
# Open GHA first so that, hopefully, Growl will already be running when the user lands in the prefpane.
"${PACKAGE_RESOURCES_DIR}/OpenAppWithoutAddingToRecents" "${INSTALL_DESTINATION_DIR}/Growl.prefPane/Contents/Resources/"

Finally, put it all back together again

pkgutil --flatten Growl Growl121.pkg

This article was posted by Kai Howells. If you liked this content and have any technical work in the Melbourne area, say hello via my contact form or give me a call on 0419 361 653 - I cover most of the greater Melbourne area and my rates are competitive.

Leave a Reply

Your email address will not be published. Required fields are marked *