July 31, 2014
Create 100’s of autopkg Recipes With This One Weird Trick

If you’re like me, you love autopkg. You don’t even want to perform searches for download links anymore.
I’m told there are certain things that can’t be automated. But, when I first saw that many recipes could follow roughly the same format, I thought to myself ‘we have to go deeper’(BUMMMMMMM!BUMBUM!)
I created RecipeGenerationUtils, which lazily generate plists in an easily-customizable format. This allows you to follow a suggested pipeline of making download, then munki, then pkg recipes. Each step builds upon the previous, and one can obviously extend it for Absolute Manage, DeployStudio, FileWave, or Casper recipes just the same. I threw in a convenience script to find .app bundles and find the appcast URL and apps bundle identifier, which puts many of the pieces in your hands.

Then Tim Sutton came along and showed the world this:

A project that has branched-off and is built upon Homebrew’s GUI install tool, Cask, has gained a lot of attention recently, but I’ve found its ability to update apps lacking. It does have a groundswell of community participation though, so one smart system can help the other! I set to work applying my generation utils, and soon after had nearly 400 'live’ download recipes to inagurate the Experimental-Brew-Cask-Recipes repo. After confirming the ids of the zipped apps I was able to fetch, pkg recipes were generated, and munki recipes for many others. The description for the apps in the generated munkirecipes are blank, and all of these should get a good look-see, once-over check that they are functional and won’t harsh your mellow.

As a result of all this heavy lifting, you can check my user for a starting point by running e.g. autopkg search -u arubdesu xscope or other apps, like this:

autopkg search -u arubdesu sketch

Name Repo/path
—- ———
sketch.download.recipe arubdesu/Experimental-Brew-Cask-Recipes/sketch/sketch.download.recipe
sketch.munki.recipe arubdesu/Experimental-Brew-Cask-Recipes/sketch/sketch.munki.recipe
sketch.pkg.recipe arubdesu/Experimental-Brew-Cask-Recipes/sketch/sketch.pkg.recipe

Let me know if you have any feedback!