I'm writing what is basically a frontend to installer services on many platforms. One of the things that I (obviously) would like to know is whether an installation has succeeded. On most platforms it's easy: just check the return code / exit code of the installer. However, it isn't so easy on the Mac (using /usr/sbin/installer
), because it always exits 0, and you must parse the output (after providing the -verboseR
option) in order to determine whether it has succeeded or failed.
I'd just figure this out by trial and error, but I'm finding it hard to engineer myself packages that are, say, broken, to figure out what the system will say when a package is broken in some way.
So I ask, dear Lazyweb: is there a canonical parser for the output of /usr/sbin/installer -verboseR
, or at least a guide describing the kinds of things it outputs? I've found this, which helps but doesn't get me all the way there. There must be something better; this seems like a common task.