blob: 7254d605fce86948c96a8615bb18db0394a84144 (
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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
|
#!/bin/sh
set -eu
PROJECT="$1"
MAILING_LIST="$2"
shift
shift
TLD="$(cat aux/tld.txt)"
IN_PLACE=false
while getopts 'i' flag; do
case "$flag" in
i)
IN_PLACE=true
;;
*)
;;
esac
done
EXPECTED_EN="$(mktemp)"
cat <<EOF | sed 's|-|\\-|g' >> "$EXPECTED_EN"
.SH AUTHORS
.MT eu@euandre.org
EuAndreh
.ME
and contributors.
.SH BUGS
.IP \(bu
Report bugs to the
.MT ~euandreh/$MAILING_LIST@lists.sr.ht
mailing list
.ME .
Use the subject "\f(CR[$PROJECT] BUG or TASK:
<description>\fR".
.IP \(bu
Browse bugs
.UR https://$TLD/$PROJECT/TODOs.html
online
.UE .
.IP \(bu
.UR https://$TLD/$PROJECT/
Homepage
.UE .
.IP \(bu
.UR https://lists.sr.ht/~euandreh/$MAILING_LIST?search=%5B$PROJECT%5D
Comments and discussions
.UE .
EOF
EXPECTED_PT="$(mktemp)"
cat <<EOF | sed 's|-|\\-|g' >> "$EXPECTED_PT"
.SH AUTORES
.MT eu@euandre.org
EuAndreh
.ME
e colaboradores.
.SH BUGS
.IP \(bu
Relate bugs na
.MT ~euandreh/$MAILING_LIST@lists.sr.ht
lista de discussão
.ME .
Use o assunto "\f(CR[$PROJECT] BUG ou TASK:
<descrição>\fR".
.IP \(bu
Veja os bugs
.UR https://$TLD/$PROJECT/TODOs.html
online
.UE .
.IP \(bu
.UR https://$TLD/$PROJECT/
Página inicial
.UE .
.IP \(bu
.UR https://lists.sr.ht/~euandreh/$MAILING_LIST?search=%5B$PROJECT%5D
Comentários e discussões
.UE .
EOF
EXPECTED_FR="$(mktemp)"
cat <<EOF | sed 's|-|\\-|g' >> "$EXPECTED_FR"
.SH AUTEURS
.MT eu@euandre.org
EuAndreh
.ME
et les contributeurs.
.SH BUGS
.IP \(bu
Soumettre un bogue dans la
.MT ~euandreh/$MAILING_LIST@lists.sr.ht
liste
de diffusion
.ME .
Utilise le sujèt "\f(CR[$PROJECT] BUG ou TASK:
<description>\fR".
.IP \(bu
Parcourir les bogues
.UR https://$TLD/$PROJECT/TODOs.html
en
ligne
.UE .
.IP \(bu
.UR https://$TLD/$PROJECT/
Page d'accueil
.UE .
.IP \(bu
.UR https://lists.sr.ht/~euandreh/$MAILING_LIST?search=%5B$PROJECT%5D
Commentaires et discussions
.UE .
EOF
EXPECTED_EO="$(mktemp)"
cat <<EOF | sed 's|-|\\-|g' >> "$EXPECTED_EO"
.SH AŬTOROJ
.MT eu@euandre.org
EuAndreh
.ME
kaj la kontribuuloj.
.SH MISFUNKCIOJ
.IP \(bu
Raportu misfunkcioj al la
.MT ~euandreh/$MAILING_LIST@lists.sr.ht
dissendolisto
.ME .
Uzu la subjekton "\f(CR[$PROJECT] BUG aŭ TASK:
<priskribo>\fR".
.IP \(bu
Foliumu misfunkcioj
.UR https://$TLD/$PROJECT/TODOs.html
rete
.UE .
.IP \(bu
.UR https://$TLD/$PROJECT/
Ĉefpaĝo
.UE .
.IP \(bu
.UR https://lists.sr.ht/~euandreh/$MAILING_LIST?search=%5B$PROJECT%5D
Komentoj kaj diskutoj
.UE .
EOF
# shellcheck disable=2044
for f in $(find doc -type f -name '*.[0-9]'); do
LINES="$(wc -l "$f" | cut -d\ -f1)"
if [ "$LINES" = 1 ] && grep -Eq '^\.so man.+$' "$f"; then
continue
fi
lang="$(echo "$f" | cut -d. -f2)"
case "$lang" in
pt)
EXPECTED="$EXPECTED_PT"
;;
fr)
EXPECTED="$EXPECTED_FR"
;;
eo)
EXPECTED="$EXPECTED_EO"
;;
*)
EXPECTED="$EXPECTED_EN"
;;
esac
if ! tail -n "$(wc -l < "$EXPECTED")" "$f" | diff - "$EXPECTED"; then
echo "Missing metadata at the end of \"$f\" file"
if [ "$IN_PLACE" = true ]; then
cat "$EXPECTED" >> "$f"
else
exit 1
fi
fi
done
|