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:
parent
e7f7a88357
commit
90448a479d
1 changed files with 18 additions and 4 deletions
22
build.sh
22
build.sh
|
@ -49,10 +49,24 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
|
|
||||||
manbuild)
|
manbuild)
|
||||||
for src in ${MAN1DSTDIR}/*.text ${MAN7DSTDIR}/*.text; do
|
trap abort INT
|
||||||
echo "Compiling manpage and html for $src"
|
abort() {
|
||||||
$A2XM "$src"
|
kill 0
|
||||||
$A2XH "$src"
|
}
|
||||||
|
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
|
done
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue