Path: blob/main/Sage_framework/build_sage_docs.sh
173 views
VERSION=`../bin/get_sage_version`1SAGE_SYMLINK=/var/tmp/sage-$VERSION-current2if [ -L ${SAGE_SYMLINK} ]; then3rm ${SAGE_SYMLINK}4elif [ -e ${SAGE_SYMLINK} ]; then5echo ${SAGE_SYMLINK} is not a symlink !!!6fi7# Build the documentatation.8# The doc build does not seem to work when done in parallel, so no -j4.9mv repo/sage ${SAGE_SYMLINK}10pushd ${SAGE_SYMLINK}11# Make sure that runpath.sh exists, is correct, and is executable.12# The sage bash script requires this.13mkdir -p local/var/lib/sage14echo SAGE_SYMLINK=${SAGE_SYMLINK} > local/var/lib/sage/runpath.sh15chmod +x local/var/lib/sage/runpath.sh16make doc-clean doc-uninstall17pushd src/doc18export PATH=${SAGE_SYMLINK}/venv/bin:$PATH19export SAGE_ROOT=${SAGE_SYMLINK}20export MATHJAX_DIR=mathjax21make doc-html--all22popd23popd24mv ${SAGE_SYMLINK} repo/sage25# Copy and compress the documentation26if [ -e repo/documentation ]; then27rm -rf repo/documentation.old28mv repo/documentation repo/documentation.old29fi30cp -R repo/sage/local/share/doc/sage/html/en repo/documentation31cp -R repo/sage/local/share/mathjax/mathjax repo/documentation/_static32sed -i '' '/Documentations in other languages/d' repo/documentation/index.html33../bin/compress_site.py repo/documentation343536