summary refs log tree commit diff
path: root/package/install-man
blob: cd4904814b9ab946cc18711a2d207d0431437c8f (plain) (blame)
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
#!/bin/sh
set -e

umask 022
test -d package || sh -cx '! : Wrong working directory.'
test -d man || sh -cx '! : Wrong working directory.'

here=`env - PATH=$PATH pwd`
parent=`dirname $here`

echo 'Compressing manpages...'
for i in man/*.[1-8]; do
  gzip -c $i >${i}.gz
done

echo 'Making manpage links in /usr/local/man...'
cd man
for i in 8; do
  mkdir -p /usr/local/man/man$i
  for j in *.$i; do
    rm -f /usr/local/man/man$i/$j.gz'{new}'
    ln -s $parent/runit/man/$j.gz /usr/local/man/man$i/$j.gz'{new}'
    mv -f /usr/local/man/man$i/$j.gz'{new}' /usr/local/man/man$i/$j.gz
  done
done
cd ..