Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
3-manifolds
GitHub Repository: 3-manifolds/Sage_macOS
Path: blob/main/Sage_framework/build_sage_docs.sh
173 views
1
VERSION=`../bin/get_sage_version`
2
SAGE_SYMLINK=/var/tmp/sage-$VERSION-current
3
if [ -L ${SAGE_SYMLINK} ]; then
4
rm ${SAGE_SYMLINK}
5
elif [ -e ${SAGE_SYMLINK} ]; then
6
echo ${SAGE_SYMLINK} is not a symlink !!!
7
fi
8
# Build the documentatation.
9
# The doc build does not seem to work when done in parallel, so no -j4.
10
mv repo/sage ${SAGE_SYMLINK}
11
pushd ${SAGE_SYMLINK}
12
# Make sure that runpath.sh exists, is correct, and is executable.
13
# The sage bash script requires this.
14
mkdir -p local/var/lib/sage
15
echo SAGE_SYMLINK=${SAGE_SYMLINK} > local/var/lib/sage/runpath.sh
16
chmod +x local/var/lib/sage/runpath.sh
17
make doc-clean doc-uninstall
18
pushd src/doc
19
export PATH=${SAGE_SYMLINK}/venv/bin:$PATH
20
export SAGE_ROOT=${SAGE_SYMLINK}
21
export MATHJAX_DIR=mathjax
22
make doc-html--all
23
popd
24
popd
25
mv ${SAGE_SYMLINK} repo/sage
26
# Copy and compress the documentation
27
if [ -e repo/documentation ]; then
28
rm -rf repo/documentation.old
29
mv repo/documentation repo/documentation.old
30
fi
31
cp -R repo/sage/local/share/doc/sage/html/en repo/documentation
32
cp -R repo/sage/local/share/mathjax/mathjax repo/documentation/_static
33
sed -i '' '/Documentations in other languages/d' repo/documentation/index.html
34
../bin/compress_site.py repo/documentation
35
36