blob: 78269b6fae59f826d4f706216f01570217d5d499 (
plain)
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
36
37
38
39
40
|
#!/bin/bash -e
#
# For more information refer to the documentation:
# https://github.com/openshift/source-to-image/blob/master/docs/builder_image.md
#
source ${0}.pre
echo "---> Installing application source ..."
rm -rf /tmp/src/.git
mv /tmp/src .
echo "---> Looking for sphinx config ..."
cfg=$(echo src/[Dd][Oo][Cc]*/conf.py)
if test ! -f "$cfg"; then
cfg="src/conf.py"
fi
if test ! -f "$cfg"; then
cfg=$(find src -name conf.py | sort | head -n 1)
fi
if test ! -f "$cfg"; then
echo "ERROR: no sphinx config found"
exit 1
fi
if test -f src/Documentation/sphinx/requirements.txt; then
echo "---> linux kernel quirk ..."
python3 -m venv linux-sphinx
source linux-sphinx/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade -r src/Documentation/sphinx/requirements.txt
fi
echo "---> Building docs, using $cfg ..."
sphinx-build ${cfg%/conf.py} html
echo "---> Cleanup ..."
rm -rf src
source ${0}.post
|