As part of the release of AutoPkg 1.1, a new-recipe feature was added to help with recipe creation.
It will create a generic recipe file with the following keys added:
- Description
- Identifier
- Input
- MinimumVersion (by default, MinimumVersion will be set for AutoPkg 1.0)
- Process
Under the Process keys, there are additional keys created by default:
- Arguments
- Processor
As an example, here’s the recipe file which is created when the following command is run:
autopkg new-recipe ~/Desktop/MyGreatApplication.download.recipe
For more details, please see below the jump.
Additional options include the following:
- –identifier
- –parent-identifier
These options allow you to define what identifier you want to set for the recipe, along with the identifier of a parent recipe. As an example, let’s set com.github.autopkg.pkg.MyGreatApplication as the identifier for a new AutoPkg .pkg recipe. To set up a new recipe using that identifier, you could run the following command:
autopkg new-recipe --identifier com.github.autopkg.pkg.MyGreatApplication ~/Desktop/MyGreatApplication.pkg.recipe
That would create a recipe with com.github.autopkg.pkg.MyGreatApplication set as the Identifier key’s value.
To include a parent recipe as part of the recipe creation process, you can use the following command to specify both the identifier you want to set for the recipe and the identifier of the parent recipe:
autopkg new-recipe --identifier com.github.autopkg.pkg.MyGreatApplication --parent-identifier com.github.autopkg.download.MyGreatApplication ~/Desktop/MyGreatApplication.pkg.recipe
That would create a recipe with com.github.autopkg.pkg.MyGreatApplication set as the Identifier key’s value and com.github.autopkg.download.MyGreatApplication set as the ParentRecipe key’s value.