Library Features

Dependencies

On can define dependencies with 3ed party programs. For example, if you add the line:

"# depends on EXECUTABLE"

to the FILE, the availability of EXECUTABLE will be checked while the FILE becomes included/imported. If EXECUTABLE could not be found, an error message like:

"dependency 'EXECUTABLE' could not be met."

will be dropped.

Conditional Comments

You can utilize the following preprocessing comments:

#if, #elif, #else or #IF, #ELIF, #ELSE

the code block in the first condition which expression that return true (0) will be included in the script.

Conditional comments must be closed by:

#fi or #FI

This is a good way to include OS dependent functions, like:

#if uname -a | grep 'Linux'
SOME LINUX SPCIFIC CODE
#elif uname -a | grep 'FreeBSD'
SOME FreeBSD SPECIFIC CODE
#else
GENERIC CODE
#fi

Preprocessing

It is also possible to run code on file inclusion. To start such a block you have to use:

#preproccess_start or #PREPROCESS_START

and it will be closed by:

#preproccess_end or #PREPROCESS_END

All code within this block will be executed and all output will be included in the script.