blob: 558fff8848d87752f42e3d68ee1a3da10cbc1b78 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/bin/sh
# this script is generated by the configure-script
prefix=$1
shift
mandir=$1
shift
edit_man_sed=$1
shift
datadir="${prefix}/share"
MKDIRS="mkinstalldirs"
INSTALL="/usr/bin/install -c"
INSTALL_DATA="${INSTALL} -m 644"
TMP=${TMPDIR-/tmp}/man$$
trap "rm -f $TMP" 0 1 2 5 15
for i in $*
do
case $i in
*.[0-9]*)
section=`expr "$i" : '.*\.\([0-9]\)[xm]*'`;
if [ ! -d $mandir/man${section} ]; then
$MKDIRS $mandir/man$section
fi
source=`basename $i`
target=`grep "^$source" man/man_db.renames | awk '{print $2}'`
if test -z "$target" ; then
echo '? missing rename for '$source
target="$source"
fi
target="$mandir/man$section/$target"
sed -e 's,@DATADIR@,$datadir,' < $i | sed -f ${edit_man_sed} >$TMP
echo installing $target
$INSTALL_DATA $TMP $target
;;
esac
done
|