SUMMARY: local man pages organization (script)

From: Mark Bergman (bergman@phri.nyu.edu)
Date: Tue Feb 11 1997 - 18:00:06 CST


Here's the script I ended up using to create the links. Once it's
complete, you'll have to join the MANPATH line and the following
line in your /usr/share/man.cf file.

WARNING! The script is a very quick hack, with no error checking. I
really can't see how it could be destructive, but it might make a
mess if your environment is distinctly different.
-----------------------------------------------------------------
#! /bin/sh
for dir in /usr/local/man/*
do
        /bin/echo "$dir...\c"
        if [ -d $dir ]
        then
                /bin/echo "..\c"
                name=`echo $dir | sed -e "s%.*\/%%" -e "s%\(...\)%\1-local%`
                cfname=`echo $name | sed -e "s/^...//"`
                
                /bin/echo "..\c"
                ln -s $dir /usr/share/man/$name
                /bin/echo "..\c"
                /bin/echo ",$cfname\c" >> /usr/share/man/man.cf
                /bin/echo "...complete.\n"
        else
                /bin/echo "not a directory...skipped.\n"
        fi
done
/bin/echo "\n\n" >> /usr/share/man/man.cf
catman -w &
-----------------------------------------------------------------

----
Mark Bergman		bergman@phri.nyu.edu				
PHRI			212-578-0822
Unix System and Network Administrator



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:46 CDT