File: install-man

package info (click to toggle)
socklog 2.1.2%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,056 kB
  • sloc: ansic: 3,356; sh: 388; makefile: 316
file content (25 lines) | stat: -rwxr-xr-x 599 bytes parent folder | download | duplicates (4)
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
#!/bin/sh -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 1 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/socklog/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 ..