From cc8dc88b55b44ca2a1fd65c049f3cfec22eb5525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Nov=C3=BD?= Date: Thu, 4 Feb 2016 16:02:42 +0100 Subject: [PATCH] Script for checking sanity of manpages Change-Id: Ia27b0ecf6a3267eb51f8a6562721dca72f128915 --- .manpages | 18 ++++++++++++++++++ doc/source/development_guidelines.rst | 8 ++++++++ 2 files changed, 26 insertions(+) create mode 100755 .manpages diff --git a/.manpages b/.manpages new file mode 100755 index 0000000000..69fcfc74d5 --- /dev/null +++ b/.manpages @@ -0,0 +1,18 @@ +#!/bin/sh + +RET=0 +for MAN in doc/manpages/* ; do + OUTPUT=$(LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l \ + -Tutf8 -Z "$MAN" 2>&1 >/dev/null) + if [ -n "$OUTPUT" ] ; then + RET=1 + echo "$MAN:" + echo "$OUTPUT" + fi +done + +if [ "$RET" -eq "0" ] ; then + echo "All manpages are fine" +fi + +exit "$RET" diff --git a/doc/source/development_guidelines.rst b/doc/source/development_guidelines.rst index ec2c45c5ba..cdee5d73dc 100644 --- a/doc/source/development_guidelines.rst +++ b/doc/source/development_guidelines.rst @@ -164,6 +164,14 @@ Installing Sphinx: #. Install sphinx (On Ubuntu: `sudo apt-get install python-sphinx`) #. `python setup.py build_sphinx` +-------- +Manpages +-------- + +For sanity check of your change in manpage, use this command in the root +of your Swift repo:: + + ./.manpages --------------------- License and Copyright