|
|
HP-UX Reference Volume 2 of 5 > mmkpdf(1M) |
|
NAMEmkpdf — create a Product Description File from a prototype PDF DESCRIPTIONThe mkpdf program reads a prototype PDF and generates a new PDF (see pdf(4)) that reflects the current status of the file system files defined by path names in the prototype file. If pathname is a directory, the size, version, checksum, and linked_to target fields are forced to be empty. If the file is a device, the version, checksum, and linked_to fields are forced to be empty and the size field contains the major and minor device numbers. If a path name in prototype_PDF is prefaced with a question mark (?), the file is assumed to be an optional file. This file is processed in the same manner as all other files except that, if the file does not exist, values provided in the prototype are reproduced, and the ?, is passed through to new_PDF. If a path name is not preceded with ?, and the file does not exist on the file system, an error is reported and no entry is added to new_PDF. If a dash (-) is used for prototype_PDF or new_PDF, mkpdf assumes that standard input and/or standard output, respectively, is being used for the appropriate value. Comments in prototype_PDF are supported as follows: Lines beginning with the percent character (%) are generally passed through, in order, to new_PDF, except that any "% Product Description File " and "% total size is ... " lines are removed to prevent duplication of these automatically generated lines in new_PDF when prototype_PDF is a PDF. Lines beginning with a pound character (#), and lines containing only the newline character (\n) are not passed through to new_PDF. Note that blank space preceding these special characters is not allowed and will generally result in error messages about files not found. A size summary is produced as a comment at the end of the PDF. Options
EXAMPLESGiven a file Proto with contents: /usr/bin/basename /usr/bin/cat /usr/bin/ccat /usr/bin/dirname /usr/bin/grep /usr/bin/ls /usr/bin/ll::::::::/usr/bin/ls /usr/bin/su the command: mkpdf -c "fileset TEST, Release 1.0" Proto - produces the PDF shown in the EXAMPLE section of pdf(4). The following example creates a totally new PDF for the fileset ALBA_CORE. The pathname and linked_to are taken from the prototype PDF. All other fields are generated from the file system. mkpdf /tmp/ALBA_CORE /system/ALBA_CORE/new.pdf The next example shows how to create a completely new PDF from just a list of files. The PDF for the files under the /PRODUCT directory is created by executing the find command (see find(1)) on all the files in the directory structure under /PRODUCT. A / is edited onto the beginning of each path name to make it absolute. The path names are then piped to mkpdf. The -r option specifies that a root of /PRODUCT should be prefixed to each path name while the directory is being searched. A - in the prototype_PDF position specifies that stdin is being used for the prototype PDF file. The resulting PDF does not contain the /PRODUCT prefix. Note that, with only a list of path names, the linked_to field of linked files will not conform to the convention explained in pdf(4). cd /PRODUCT find * -print | sed -e 's:^:/:' | mkpdf -r /PRODUCT - PDF RETURN VALUEUpon completion, mkpdf returns one of the following values:
DIAGNOSTICSfilename: no such file or directory
WARNINGSSizes reported do not reflect blocks allocated to directories. Use of PDFs is discouraged since this functionality is obsolete and is being replaced with Software Distributor (see sd(4)). |
|