only generate man|html pages when necessery; allow the process to be interrupted

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-03-29 23:52:31 +02:00
parent e7f7a88357
commit 90448a479d
1 changed files with 18 additions and 4 deletions

View File

@ -49,10 +49,24 @@ case "$1" in
;;
manbuild)
for src in ${MAN1DSTDIR}/*.text ${MAN7DSTDIR}/*.text; do
echo "Compiling manpage and html for $src"
$A2XM "$src"
$A2XH "$src"
trap abort INT
abort() {
kill 0
}
for section in 1 7; do
for src in ${MANDIR}/man${section}/*.text; do
manpage="${src%.text}.$section"
if [ ! -f "$manpage" -o "$manpage" -ot "$src" ]; then
echo "Compiling manpage for $src"
setsid $A2XM "$src"
a2x_pids=""
fi
htmlpage="${src%.text}.html"
if [ ! -f "$htmlpage" -o "$htmlpage" -ot "$src" ]; then
echo "Compiling html for $src"
$A2XH "$src"
fi
done
done
;;