vpp/docs/scripts/sphinx-make.sh
jdenisco 65ed2d0503 docs: Add version and build date
Change-Id: I6fd53d3ef12e4b6f1af1e5605c09938bce324ec9
Signed-off-by: jdenisco <jdenisco@cisco.com>
2018-11-06 18:21:10 +00:00

20 lines
542 B
Bash
Executable File

#!/bin/bash
if [ "$1" == "venv" ]
then
python -m pip install --user virtualenv
python -m virtualenv $VENV_DIR
source $VENV_DIR/bin/activate;
pip install -r $DOCS_DIR/etc/requirements.txt
else
source $VENV_DIR/bin/activate;
VERSION=`source $WS_ROOT/src/scripts/version`
TM=`TZ=GMT date`
sed -ie "s/**VPP Version:\*\* .*/**VPP Version:** $VERSION/" $DOCS_DIR/about.rst
sed -ie "s/**Built on:\*\* .*/**Built on:** $TM/" $DOCS_DIR/about.rst
rm $DOCS_DIR/about.rste
make -C $DOCS_DIR $1
fi
deactivate