File: fixmanpages

package info (click to toggle)
erlang 1%3A23.2.6%2Bdfsg-1%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 199,804 kB
  • sloc: erlang: 1,509,787; xml: 412,313; ansic: 393,504; cpp: 51,923; makefile: 18,193; sh: 13,051; lisp: 9,681; java: 8,061; python: 5,195; perl: 4,322; asm: 3,586; pascal: 3,435; javascript: 595; sed: 72; php: 2
file content (83 lines) | stat: -rw-r--r-- 2,397 bytes parent folder | download | duplicates (11)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#! /bin/sh

DIR=$1
PASS=$2

cp $DIR/man3/dialyzer.3 $DIR/man1/dialyzer.1
mv $DIR/man1/start.1 $DIR/man1/start_embedded.1

# Fix manpages
for f in $DIR/*/*.1 ; do
    sed -i -e's/, start_erl(1)//g' \
	   -e's/start(1)/start_embedded(1)/g' \
	$f
done

sed -i -e's/^\(\.TH .*\) 3 \(.*\) "Erlang Module Definition"/\1 1 \2 "User Commands"/' \
    $DIR/man1/dialyzer.1

sed -i -e's/^start \\-/start_embedded \\-/' \
       -e's/^\.TH start 1/.TH start_embedded 1/' \
    $DIR/man1/start_embedded.1

for f in $DIR/*/*.[1-7] ; do
    sed -i -e's/^\(\.TH .*\) 3 /\1 3erl /' \
	   -e"s/^'Erlang'/\\\\\&'Erlang'/" \
	   -e"s/^'super\./\\\\\&'super./" \
	   -e"s/^'renat\./\\\\\&'renat./" \
	   -e"s/^'grouse\./\\\\\&'grouse./" \
	   -e"s/^'gauffin1\./\\\\\&'gauffin1./" \
	   -e's/^\.\./\\\&../' \
	   -e"s/^'->/\\\\\&'->/" \
	   -e's/\([^[:space:]]\)(3)/\1(3erl)/g' \
	   -e's/\([^[:space:]]\)(4)/\1(5)/g' \
	   -e's/\([^[:space:]]\)(6)/\1(7)/g' \
	$f
done

for f in $DIR/*/*.3 ; do \
    mv $f ${f}erl ; \
done

if [ $PASS = 1 ] ; then
    exit 0
fi

N1=INET-ADDRESS-MIB
N2=OTP-SNMPEA-MIB
N3=RFC1213-MIB
N4=SNMP-COMMUNITY-MIB
N5=SNMP-FRAMEWORK-MIB
N6=SNMP-MPD-MIB
N7=SNMP-NOTIFICATION-MIB
N8=SNMP-TARGET-MIB
N9=SNMP-USER-BASED-SM-MIB
N10=SNMP-USM-AES-MIB
N11=SNMPv2-MIB
N12=SNMPv2-TM
N13=SNMP-VIEW-BASED-ACM-MIB
N14=STANDARD-MIB
N15=TRANSPORT-ADDRESS-MIB
MIB='The Erlang/OTP MIB module'
D1="$MIB for textual conventions for representing Internet addresses"
D2="$MIB for the SNMPEA component in OTP"
D3="$MIB for RFC-1213"
D4="$MIB for supporting coexistence between SNMPv1, SNMPv2, and SNMPv3"
D5="$MIB for textual conventions used in the SNMP management architecture"
D6="$MIB for message processing and dispatching"
D7="$MIB for mechanisms to remotely configure the parameters for the generation of notifications"
D8="$MIB for mechanisms to remotely configure the parameters for the generation of SNMP messages"
D9="$MIB for the SNMP user-based security model"
D10="$MIB for the use of AES by SNMP's user-based security model"
D11="$MIB for SNMP entities"
D12="$MIB for SNMPv2 Transport Mappings"
D13="$MIB for the view-based access control model for SNMP"
D14="$MIB for SNMP standard datatypes"
D15="$MIB for commonly used transport address definitions"

for i in `seq 1 15` ; do
    eval sed -i -e\'2i.SH NAME\' \
		-e\"2i\$N$i \\\\\\- \$D$i\" \
		-e\'2i.SH DESCRIPTION\' \
	     \$DIR/*/\$N$i.7
done