add directory Linux-0.98
This commit is contained in:
86
Linux-0.98/Yggdrasil-0.98.3/usr/lib/man/makewhatis
Executable file
86
Linux-0.98/Yggdrasil-0.98.3/usr/lib/man/makewhatis
Executable file
@@ -0,0 +1,86 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# makewhatis -- update the whatis database in the man directories.
|
||||
#
|
||||
# Copyright (c) 1991, John W. Eaton.
|
||||
#
|
||||
# You may distribute under the terms of the GNU General Public
|
||||
# License as specified in the README file that comes with the man 1.0
|
||||
# distribution.
|
||||
#
|
||||
# John W. Eaton
|
||||
# jwe@che.utexas.edu
|
||||
# Department of Chemical Engineering
|
||||
# The University of Texas at Austin
|
||||
# Austin, Texas 78712
|
||||
|
||||
PATH=/bin:/usr/local/bin:/usr/ucb:/usr/bin
|
||||
|
||||
if [ $# = 0 ]
|
||||
then
|
||||
echo "usage: makewhatis directory [...]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo $*
|
||||
for dir in $*
|
||||
do
|
||||
echo $dir
|
||||
cd $dir
|
||||
for subdir in man*
|
||||
do
|
||||
echo " " $subdir
|
||||
if [ -d $subdir ]
|
||||
then
|
||||
echo "in if"
|
||||
for f in `find . -name '*' -print`
|
||||
do
|
||||
echo " " $f
|
||||
sed -n '/^\.TH.*$/p
|
||||
/^\.SH[ ]*NAME/,/^\.SH/p' $f |\
|
||||
sed -e 's/\\[ ]*\-/-/
|
||||
s/^.PP.*$//
|
||||
s/\\(em//
|
||||
s/\\fI//
|
||||
s/\\fR//' |\
|
||||
awk 'BEGIN {insh = 0} {
|
||||
if ($1 == ".TH")
|
||||
sect = $3
|
||||
else if ($1 == ".SH" && insh == 1) {
|
||||
if (i > 0 && name != NULL) {
|
||||
namesect = sprintf("%s (%s)", name, sect)
|
||||
printf("%-20.20s", namesect)
|
||||
printf(" - ")
|
||||
for (j = 0; j < i-1; j++)
|
||||
printf("%s ", desc[j])
|
||||
printf("%s\n", desc[i-1])
|
||||
}
|
||||
} else if ($1 == ".SH" && insh == 0) {
|
||||
insh = 1
|
||||
count = 0
|
||||
i = 0
|
||||
} else if (insh == 1) {
|
||||
count++
|
||||
if (count == 1 && NF > 2) {
|
||||
start = 2
|
||||
if ($2 == "-") start = 3
|
||||
if (NF > start + 1)
|
||||
for (j = start; j <= NF; j++)
|
||||
desc[i++] = $j
|
||||
name = $1
|
||||
} else {
|
||||
for (j = 1; j <= NF; j++)
|
||||
desc[i++] = $j
|
||||
}
|
||||
}
|
||||
}'
|
||||
done
|
||||
cd ..
|
||||
fi
|
||||
echo "after if"
|
||||
done | sort
|
||||
# > $dir/whatis.db.tmp
|
||||
mv $dir/whatis.db.tmp $dir/whatis
|
||||
done
|
||||
|
||||
exit
|
||||
42
Linux-0.98/Yggdrasil-0.98.3/usr/lib/man/manpath.config
Normal file
42
Linux-0.98/Yggdrasil-0.98.3/usr/lib/man/manpath.config
Normal file
@@ -0,0 +1,42 @@
|
||||
# manpath.config
|
||||
#
|
||||
# Edit this file to match your site.
|
||||
#
|
||||
# Copyright (c) 1991, John W. Eaton.
|
||||
#
|
||||
# You may distribute under the terms of the GNU General Public
|
||||
# License as specified in the README file that comes with the man 1.0
|
||||
# distribution.
|
||||
#
|
||||
# John W. Eaton
|
||||
# jwe@che.utexas.edu
|
||||
# Department of Chemical Engineering
|
||||
# The University of Texas at Austin
|
||||
# Austin, Texas 78712
|
||||
#
|
||||
# This file is read by manpath to configure the mandatory manpath, to
|
||||
# map each path element to a manpath element and to determine where the
|
||||
# "man" binary lives. The format is:
|
||||
#
|
||||
# MANBIN pathname
|
||||
# MANDATORY_MANPATH manpath_element
|
||||
# MANPATH_MAP path_element manpath_element
|
||||
#
|
||||
# MANBIN is optional.
|
||||
#
|
||||
#MANBIN /usr/local/lib/man
|
||||
#
|
||||
# every automatically generated MANPATH includes these fields
|
||||
#
|
||||
MANDATORY_MANPATH /usr/man
|
||||
MANDATORY_MANPATH /usr/local/man
|
||||
MANDATORY_MANPATH /usr/X11/man
|
||||
#
|
||||
# set up PATH to MANPATH mapping
|
||||
#
|
||||
MANPATH_MAP /bin /usr/man
|
||||
MANPATH_MAP /usr/bin /usr/man
|
||||
MANPATH_MAP /usr/ucb /usr/man
|
||||
MANPATH_MAP /usr/local/bin /usr/local/man
|
||||
MANPATH_MAP /usr/bin/X11 /usr/X11/man
|
||||
MANPATH_MAP /usr/TeX/bin /usr/TeX/man
|
||||
Reference in New Issue
Block a user