AOSC Wiki / Developer / Automation / .
Also available in:

ACBS Package Metadata Language

Reduced Bash syntax for describing packages

apml is a subset of the Bash command language used to describe the metadata of an AOSC OS package.

Generally, it includes Bash's syntax of variable definition and shell expansion, but not command execution (i.e. command execution, pipes and work control). This is done in several reasons:

Note that apml is not stable yet. It may be subject to change in the future.

Variable declarations§

Variable declarations are allowed, eg. a=b.

Comments§

Comments in Bash reference

Single line comment and inline comment are supported.

# A comment line
a=b # inline comment

Quoting§

Quoting in Bash reference

Glob pattern§

All bash glob patterns except Bash Extended Globbing are supported.

See more about glob patterns on glob(7). Note that glob is NOT regular expression.

Shell Expansion§

Shell Expansions in Bash reference

Substring§

If offset < 0, then the offset must be inside parentheses and the starting point is length - offset.

If length < 0, the result would be an empty string.

Match prefix/suffix and delete§

Glob patterns can be used in word.

Replace§

Glob patterns can be used in pattern.

String manupulation§

Glob patterns can be used in pattern. Characters matched in the pattern will be converted.

Miscellaneous§