blueprint-template - mustache.sh template language syntax
{{VARIABLE}}
{{#VARIABLE}}...{{/VARIABLE}}
{{^VARIABLE}}...{{/VARIABLE}}
{{!COMMENT}}
{{`COMMAND`}}
{{#`COMMAND`}}...{{/`COMMAND`}}
Templates are rendered by blueprint-template(1) and blueprint-apply(1), and by POSIX shell code generated by blueprint-show(1). They use the mustache.sh template rendering engine.
Templates may make use of the following syntax:
{{VARIABLE}}
VARIABLE is read from the environment and substituted directly.
{{#VARIABLE}}...{{/VARIABLE}}
The intervening ... is substituted for the entire tag if VARIABLE is in the environmente and is non-empty. Other tags may be nested within.
{{^VARIABLE}}...{{/VARIABLE}}
The opposite of # sections: the intervening ... is substituted for the entire tag if VARIABLE is not in the environmente or is empty. Other tags may be nested within.
{{!COMMENT}}
The tag is removed unconditionally. Comments do not appear in the rendered output.
{{`COMMAND`}}
COMMAND is executed and anything written to standard output is substituted directly.
{{#`COMMAND`}}...{{/`COMMAND`}}
COMMAND is executed and ... is rendered once for each line written to standard output. The environment is unchanged from line-to-line except for the value of _M_LINE, which contains each successive line of standard output.
The Flaming Lips - "The W.A.N.D. (The Will Always Negates Defeat)"
Richard Crowley richard@devstructure.com
Part of blueprint(1).
mustache(5) at http://mustache.github.com/mustache.5.html and mustache.sh at https://github.com/rcrowley/mustache.sh.