man page maintenance scripts (c) 2004 njk, GPL licensed

Introduction and disclaimer.
---

These scripts are not to be blindly used.  It is likely that they will cause
damage if used in ignorance.  That said, they work for me, although I make
no guarantees that they won't obliterate your system.

Usage
---

I keep copies of the scripts in my /usr/man and /usr/local/man directories.
Whenever I want to gzip my manual pages, I simply cd to the /usr/man or
/usr/local/man directory and invoke clean-man.  It will compress your man
pages, attempting to remap symlinks as needed.  If it prints errors, it is
likely that your original symlinks were broken.  Examine and fix them by
hand.

The fix-brksym is much more complex and more liable to bite the user.  It
exists to automate the annoying problem of finding symlinks that have been
gzipped and turned into files.  Such former symlinks are broken, although
not obviously so (it appears that man can compensate for the problem).

fix-brksym should be run from the /usr/man or /usr/local/man directory.  It
will open a vim session once for each directory.  In the vim session, the
user needs to delete all files that are *not* broken symlinks.  It should
not be hard to complete this task, since the list is sorted by size and
broken symlinks are small gz files, usually below 70-120 bytes in length.
Delete everything from the list but the lines that list broken symlinks
(the dG vim command is handy here).  Save and exit vim.  fix-brksym will
then clean up and relink the files as needed.  It will leave a FIXINDEX
file in each directory.  You may use this file to check fix-brksym's work
for correctness.  Once you are satisfied, manually delete the FIXINDEX files
to save a bit more space.


