File: makeman

package info (click to toggle)
lsof 4.99.4%2Bdfsg-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,924 kB
  • sloc: ansic: 50,680; sh: 8,351; makefile: 1,194; perl: 940; awk: 214
file content (46 lines) | stat: -rwxr-xr-x 654 bytes parent folder | download | duplicates (2)
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
38
39
40
41
42
43
44
45
46
#!/bin/ksh
#
# makman -- make lsof 4.x man page for ftp tree

SD=${HOME}/src/lsof4
cd $SD

# Get version number.

V=`sed '/VN/s/.ds VN \(.*\)/\1/' version`
if test $? -ne 0
then
  echo $V
  exit 1
fi

# Handle optional edition suffix.

if test $# -gt 0
then
  if test $# -gt 1
  then
    echo "Usage: makeman [edition]"
    exit 1
  fi
  V=${V}$1
fi

# Define man file names.

MS=Lsof.8
MD=${SD}/support/lsof.8
MF=${SD}/support/lsof_${V}.man

# Set exit cleanup trap.

trap 'rm -rf $MD $MF; exit' 1 2 3 15

# Create manual page files.

echo Producing $MD
soelim < $MS > $MD
echo Producing $MF
nroff -man $MD | colcrt - | cat -s > $MF
rm -f $MD
ls -l $MF