script to install preformatted manual pages

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9234 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2000-11-30 01:38:17 +00:00
parent e4e49e9b90
commit 6ee1eb2577

25
cf/install-catman.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/sh
#
# $Id$
#
# install preformatted manual pages
INSTALL_DATA="$1"; shift
mkinstalldirs="$1"; shift
srcdir="$1"; shift
mandir="$1"; shift
suffix="$1"; shift
for f in "$@"; do
base=`echo "$f" | sed 's/\(.*\)\.\([^.]*\)$/\1/'`
section=`echo "$f" | sed 's/\(.*\)\.\([^.]*\)$/\2/'`
catdir="$mandir/cat$section"
c="$base.cat$section"
if test -f "$srcdir/$c"; then
if test \! -d "$catdir"; then
eval "$mkinstalldirs $catdir"
fi
eval "echo $INSTALL_DATA $srcdir/$c $catdir/$base.$suffix"
eval "$INSTALL_DATA $srcdir/$c $catdir/$base.$suffix"
fi
done