Ticket #2990: Prepare for release mc-4.8.9

Change maint/doctest utility to run under maint directory

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Slava Zanko 2013-04-05 01:47:06 +03:00
parent 1df77c409e
commit b0876fb044
4 changed files with 78 additions and 39 deletions

View File

@ -351,9 +351,9 @@ a:
.IP
.br
1) Opción de ejecución en línea de órdenes
.B \-K \<mapa\>
.B \-K <mapa>
o
.B \-\-keymap=\<mapa\>
.B \-\-keymap=<mapa>
.br
2) Variable de entorno
.B MC_KEYMAP
@ -3457,9 +3457,9 @@ El archivo se busca, en orden, de varias maneras:
.IP
.br
1) La opción
.B \-S \<skin\>
.B \-S <skin>
o
.B \-\-skin=\<skin\>
.B \-\-skin=<skin>
al ejecutar mc.
.br
2) La variable de entorno

View File

@ -338,9 +338,9 @@ User\-defined keymap\-file is searched on the following algorithm (to the first
.IP
.br
1) command line option
.B \-K \<keymap\>
.B \-K <keymap>
or
.B \-\-keymap=\<keymap\>
.B \-\-keymap=<keymap>
.br
2) Environment variable
.B MC_KEYMAP
@ -2770,13 +2770,13 @@ Toggle show of line numbers.
.B f
Maximize left panel.
.PP
.B \=
.B =
Make panels equal in width.
.PP
.B \>
.B >
Reduce the size of the right panel.
.PP
.B \<
.B <
Reduce the size of the left panel.
.PP
.B c
@ -3612,9 +3612,9 @@ A skin\-file is searched on the following algorithm (to the first one found):
.IP
.br
1) command line option
.B \-S \<skin\>
.B \-S <skin>
or
.B \-\-skin=\<skin\>
.B \-\-skin=<skin>
.br
2) Environment variable
.B MC_SKIN

View File

@ -331,9 +331,9 @@ S\-<символ> означает, что нужно держать в нажа
.IP
.br
1) параметр командной строки
.B \-K \<файл\>
.B \-K <файл>
или
.B \-\-keymap=\<файл\>
.B \-\-keymap=<файл>
.br
2) переменная окружения
.B MC_KEYMAP
@ -3033,13 +3033,13 @@ mcdiff \- это встроенное средство для сравнения
.B f
Увеличить левую панель до максимума.
.PP
.B \=
.B =
Сделать панели равными по ширине.
.PP
.B \>
.B >
Увеличить левую панель.
.PP
.B \<
.B <
Увеличить правую панель.
.PP
.B c
@ -4005,9 +4005,9 @@ menuhotsel=yellow;black;bold+underline
.IP
.br
1) параметр командной строки
.B \-S \<скин\>
.B \-S <скин>
или
.B \-\-skin=\<скин\>
.B \-\-skin=<скин>
.br
2) переменная окружения
.B MC_SKIN

View File

@ -1,37 +1,76 @@
#!/bin/sh
#!/bin/bash
# Run this script in the top-level source directory to check the
# documentation for compatibility with groff and nroff.
# Midnight Commander - check the documentation for compatibility with groff and nroff.
#
# Copyright (C) 2002, 2003, 2011, 2013
# The Free Software Foundation, Inc.
#
# Written by:
# Pavel Roskin <proski@gnu.org> 2002, 2003
# Ilia Maslakov <il.smind@gmail.com>, 2011
# Slava Zanko <slavazanko@gmail.com>, 2013
#
# This file is part of the Midnight Commander.
#
# The Midnight Commander is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# The Midnight Commander is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set -e
#set -e
MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(pwd))}
#*** include section (source functions, for example) *******************
#*** file scope functions **********************************************
one_test() {
"$@" >/dev/null 2>doctest.err
if test -s doctest.err; then
echo "ERROR messages follow:" 2>&1
cat doctest.err 2>&1
echo "ERROR while running following command:" 2>&1
echo "$@" 2>&1
echo "ERROR messages are preserved in doctest.err"
exit 1
fi
"$@" >/dev/null 2>doctest.err
if test -s doctest.err; then
echo "ERROR messages follow:" 2>&1
cat doctest.err 2>&1
echo "ERROR while running following command:" 2>&1
echo "$@" 2>&1
echo "ERROR messages are preserved in doctest.err"
exit 1
fi
}
test -r doc/man/mc.1.in || { echo "ERROR: cannot read doc/mc.1.in" 2>&1; exit 1; }
#*** main code *********************************************************
[ -r "${MC_SOURCE_ROOT_DIR}/doc/man/mc.1.in" ] || {
echo "ERROR: cannot read doc/mc.1.in" 2>&1
exit 1
}
# Test the documentation for possible errors.
for i in `find doc -name '*.[1-9].in'`; do
echo "test $i"
cat $i |preconv -e UTF8| groff -wall -mandoc -Tutf8 | grep "warning:"
for i in $(find "${MC_SOURCE_ROOT_DIR}/doc" -name '*.[1-9].in'); do
echo "test (groff): $i"
preconv -e UTF8 "${i}" | \
groff -wall -mandoc -Tutf8 | \
grep "warning:"
done
for i in `find doc -name '*.[1-9].in'`; do
echo "test $i"
cat $i |preconv -e UTF8| nroff -Tutf8 -mandoc | grep "warning:"
for i in $(find "${MC_SOURCE_ROOT_DIR}/doc" -name '*.[1-9].in'); do
echo "test (nroff): $i"
preconv -e UTF8 "${i}" | \
nroff -Tutf8 -mandoc | \
grep "warning:"
done
# Check the English manuals to be in ASCII.
one_test find doc -maxdepth 1 -name '*.[1-9].in' -exec groff -wall -Tascii {} \;
one_test find "${MC_SOURCE_ROOT_DIR}/doc" -maxdepth 1 -name '*.[1-9].in' -exec groff -wall -Tascii {} \;
rm -rf doctest.err
exit 0