Packaging your software applications

The awk class script

The awk installation class provides a method of installing and removing objects that require modification to an existing object on the target machine (the object must have been previously installed from another package installation). Modifications are delivered as awk instructions in an awk class action script.

The awk class action script executes automatically at the time of installation if a file belonging to class awk exists. Such a file contains instructions for the awk class script in the format shown in the following example. Two commands indicate when instructions should be executed. awk instructions that follow the !install command are executed during package installation and those that follow the !remove command are executed during package removal. It does not matter in which order the commands are used in the file.

The name of the awk class file should be the same as the name of the file upon which the instructions will be executed.

   # comment, which may appear on any line in the file
   # awk(C) program to install changes
      . . . (awk program)

!remove # awk1(C) program to remove changes . . . (awk program)

The file to be modified is used as input to awk and the output of the script ultimately replaces the original object. Parameters cannot be passed to awk using this syntax.

See case study 5a for example awk class action script examples.

Next topic: The build class script
Previous topic: -1

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003