TIPIDEE-CONFIG-PREPROCESS(8)

NAME
tipidee-config-preprocess - read a line-based configuration file like tipidee.conf, and replace lines with the full contents of included files where appropriate

SYNOPSIS
tipidee-config-preprocess file

DESCRIPTION
tipidee-config-preprocess is a tool that reads a line-based configuration file like tipidee.conf containing ‘!include’, ‘!includedir’ and ‘!included:’ directives, and preprocesses it, replacing the lines where these directive appear with the full contents of included files where appropriate.

tipidee-config-preprocess is not supposed to be invoked directly by the user. It is automatically invoked by the tipidee-config(8) program.

tipidee-config-preprocess reads file and writes its contents to stdout.

If file contains a line starting with ‘!included:’, this line is not printed.

If file contains a line starting with ‘!include’ or ‘!includedir’, this line is replaced with the contents of appropriately included files.

tipidee-config-preprocess then exits 0.

tipidee-config-preprocess does not know anything about the tipidee.conf(5) file format. It was purposefully written to be generic: it only reads lines and includes files based on ‘!include’ information, and inserts ‘’! lines into the output stream to help with error reporting. It can be used as a preprocessor for other tools.

  Detailed operation

•   tipidee-config-preprocess reads file, looking for lines that start with a ‘’! ( bang). It prints other lines as is to its stdout.

•   A line that starts with ‘’! is not printed. Instead, it is parsed for an ‘!include’, ‘!includedir’ or ‘!included:’ directive.

•   ‘!included:’ directives immediately inform the file currently being preprocessed.

•   ‘!include foo’ and ‘!includedir bar’ directives cause tipidee-config-preprocess to immediately start preprocessing file foo or all files in directory bar; this can happen recursively. When it's done preprocessing foo or bar, tipidee-config-preprocess resumes its current file where it had left it.

•   Around inclusions, tipidee-config-preprocess prints special lines starting with a single ‘’! ( bang) and containing line and file information. This helps tipidee-config(8) track which file the data it's reading comes from and accurately report errors.

EXIT STATUS
If tipidee-config-preprocess exits nonzero, tipidee-config(8) will immediately exit with the same error code.

0   Success.

1   Syntax error.

2   Invalid inclusion ( cycle or unauthorized duplicate).

100 Wrong usage.

111 System call failed.

SEE ALSO
tipidee.conf(5), tipidee-config(8)

This man page is ported from the authoritative documentation at: https://skarnet.org/software/tipidee/tipidee-config-preprocess.html

AUTHORS
Laurent Bercot Alexis <flexibeast@gmail.com> (man page port)