blob: dbc3e0ba882a4d4fd1e87892fd78bec1eae2dd21 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#!/bin/sh
set -eu
# This is more portable than `which' but comes with
# the caveat of not(?) properly working on busybox's ash:
existence()
{
type "$1" >/dev/null 2>&1
}
cd "${MESON_DIST_ROOT}"
echo "Updating handbook..."
if existence sphinx-build; then
cwd=$PWD
cd contrib/sphinx || exit 1
if test -e _build; then
make clean
fi
# GNS
make html >/dev/null || exit 1
if test -e ../../doc/handbook/html; then
rm -r ../../doc/handbook/html || exit 1
fi
cp -r _build/html ../../doc/handbook/ || exit 1
if test -e ../../doc/handbook/texinfo; then
rm -r ../../doc/handbook/texinfo || exit 1
fi
make info >/dev/null || exit 1
cp -r _build/texinfo ../../doc/handbook/ || exit 1
cd $cwd
else
echo "ERROR: Sphinx not found! Unable to generate recent documentation."
exit 1
fi
|