forked from ungleich-public/cdist
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
20
build.sh
20
build.sh
|
@ -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"
|
||||
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
|
||||
;;
|
||||
|
||||
|
|
Loading…
Reference in a new issue