-
Committer:
Amber Jain
-
Date:
2012-08-23 07:43:55 UTC
-
Revision ID:
i.amber.jain@gmail.com-20120823074355-vc6mfu9d9t65ioja
1. Adding manpage ocpkg.8.
2. Also made corresponding changes to ocpkg usage() help function which gets triggered using ocpkg's -h option.
3. Basically, ocpkg.8 (manpage) is generated using 'ocpkg -h'. This is done using txt2man (in Ubuntu repos). In my humble opinion, this simplifies the process of documentation by removing the need to update both manpage and usage(). Now the developer simply needs to keep usage() up-to-date and run following command to update manpage automatically:
./ocpkg -h | txt2man -s 8 -t ocpkg -v "ocpkg manual" > ./ocpkg.8
In the above command, we pipe the output of './ocpkg -h' to 'txt2man' which converts the output of usage() into nroff/troff standard man(7) macros used to format Unix manual pages (and redirects the output to be written to ./ocpkg.8 file).
I guess this simplifies the whole process of documentation for ocpkg.