From db8634c6e88cb21f435264eae1609fdc45c687f3 Mon Sep 17 00:00:00 2001 From: Geoffrey Oxberry Date: Tue, 21 Jan 2014 00:25:31 -0800 Subject: [PATCH] CONTRIBUTING: Add method for finding package ids. Package IDs are contained within tags within PackageInfo files. These files can be located by unpackaging a package with `pkgutil --expand` and then using the `find` command. --- CONTRIBUTING.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f1c21cf2a6..0de4ec1282 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -294,6 +294,13 @@ And the following methods may be useful for interpolation: * We have some conventions for projects without version-specific URLs. `latest` is a common version for those, but you can grep through the existing Casks for other examples. +* One method for finding package bundle id(s) is the following: + 1. Unpack `/path/to/my.pkg` (replace with your package name) with `pkgutil --expand /path/to/my.pkg /tmp/expanded.unpkg`. + 2. The unpacked package is a folder. Bundle id(s) are contained within files named `PackageInfo`. These files can be found + with the command `find /tmp/expanded.unpkg -name PackageInfo`. + 3. `PackageInfo` files are XML files, and bundle id(s) are found within the `identifier` attributes of `` tags that look like + ``, where extraneous attributes have been snipped out and replaced with ellipses. + 4. Once bundle id(s) have been identified, the unpacked package directory can be deleted. ## Testing Your New Cask