Skip to content

Commit cc8dc88

Browse files
onovynotmyname
authored andcommitted
Script for checking sanity of manpages
Change-Id: Ia27b0ecf6a3267eb51f8a6562721dca72f128915
1 parent 4e370e5 commit cc8dc88

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.manpages

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
3+
RET=0
4+
for MAN in doc/manpages/* ; do
5+
OUTPUT=$(LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l \
6+
-Tutf8 -Z "$MAN" 2>&1 >/dev/null)
7+
if [ -n "$OUTPUT" ] ; then
8+
RET=1
9+
echo "$MAN:"
10+
echo "$OUTPUT"
11+
fi
12+
done
13+
14+
if [ "$RET" -eq "0" ] ; then
15+
echo "All manpages are fine"
16+
fi
17+
18+
exit "$RET"

doc/source/development_guidelines.rst

+8
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,14 @@ Installing Sphinx:
164164
#. Install sphinx (On Ubuntu: `sudo apt-get install python-sphinx`)
165165
#. `python setup.py build_sphinx`
166166

167+
--------
168+
Manpages
169+
--------
170+
171+
For sanity check of your change in manpage, use this command in the root
172+
of your Swift repo::
173+
174+
./.manpages
167175

168176
---------------------
169177
License and Copyright

0 commit comments

Comments
 (0)