first previous next last contents

The Internals of the Pregap Script

The pregap script is well commented and each stage is clearly separated. The best documentation for its internals is therefore the script itself. Hence this section is quite brief.

The aims of the script are that it be simple to modify, and that it should not require any extra files, including the system-pregaprc. Hence it also contains a few hard-coded sensible defaults incase no system-pregaprc file is found.

After the initialisation stages each stage processes the ${fofn}.passed file. Any failures during this stage are appended to the already existent ${fofn}.failed file. A new ${fofn}.passed file is written at the end of each stage. This allows for each stage to be a separate task and hence it is easy to remove existing stages and add new ones.

The script is written in a modern bourne shell syntax. The original BSD bourne shell did not allow functions. On some systems this is still the case, hence the strange exec calls at the start. Porting the script to other systems should be trivial provided an adequate bourne shell can be found. Note that a XPG4 compliant echo command is required. This is an echo that understands the '\c' suffix to suppress newlines. These exist on all the platforms we support and pregap automatically uses the appropriate binary or internal shell command.

first previous next last contents
This page is maintained by James Bonfield. Last generated on 2 Febuary 1999.