Sprinter formulas are the building block of sprinter environments: they handle a specific piece of functionality of your environment, from cloning a git repository to install system packages.
In your sprinter environment configuration, each section (aside from some reserved names) represents a configured formula, knows as a feature. Here is an example:
[sub]
recipe = sprinter.formulas.git
url = git://github.com/Toumorokoshi/sub.git
branch = yusuke
rc = temp=`pwd`; cd %(sub:root_dir)s/libexec && . sub-init2 && cd $tmp
This section:
Configuration parameters vary from recipe to recipe, so look at the documentation to figure out which parameters are available to you.
Now let’s talk more about formulas in detail.
Currently, formulas can be found in one place:
contained inside the standard sprinter library. Currently the formulas include:
- command, to execute a commnd
- env, to add environment variables
- git, for git repo cloning
- package, to install packages from the package manager of your environment
- perforce, to configure and install perforce
- ssh, to set up an ssh key
- template, to specialize a template and write it to a specified location
- unpack, to unpack tar.gz files
Although sprinter formulas perform different functions, they all have a common set of functionality to facilitate workflows like adding files to the init script.
These functions are: