| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
prefix=$1 |
| 4 |
mandir=$2 |
| 5 |
grc=0 |
| 6 |
|
| 7 |
if [ "x${prefix}" = x ]; then |
| 8 |
echo "prefix is not set" |
| 9 |
exit 1 |
| 10 |
fi |
| 11 |
|
| 12 |
if [ "x${mandir}" = x ]; then |
| 13 |
echo "mandir is not set" |
| 14 |
exit 1 |
| 15 |
fi |
| 16 |
|
| 17 |
systype=`uname -s` |
| 18 |
case ${systype} in |
| 19 |
NetBSD) |
| 20 |
# netbsd uses /usr/pkg/man |
| 21 |
mandir="${prefix}/man" |
| 22 |
;; |
| 23 |
OpenBSD) |
| 24 |
# openbsd cmake puts the man pages at the top level. |
| 25 |
# match what cmake does. |
| 26 |
# I don't know why there is a mis-match between cmake and where |
| 27 |
# the os puts the system manual pages. |
| 28 |
mandir="${prefix}/man" |
| 29 |
;; |
| 30 |
esac |
| 31 |
|
| 32 |
instmandir="${mandir}" |
| 33 |
if [ ! "x${DESTDIR}" = x ]; then |
| 34 |
instmandir="${DESTDIR}/${mandir}" |
| 35 |
fi |
| 36 |
|
| 37 |
test -d ${instmandir}/man1 || mkdir -p ${instmandir}/man1 |
| 38 |
cp -f man/di.1 ${instmandir}/man1/ |
| 39 |
rc=$? |
| 40 |
if [ $rc -ne 0 ]; then |
| 41 |
grc=1 |
| 42 |
fi |
| 43 |
|
| 44 |
test -d ${instmandir}/man3 || mkdir -p ${instmandir}/man3 |
| 45 |
cp -f man/libdi.3 ${instmandir}/man3/ |
| 46 |
rc=$? |
| 47 |
if [ $rc -ne 0 ]; then |
| 48 |
grc=1 |
| 49 |
fi |
| 50 |
|
| 51 |
exit $grc |