summaryrefslogtreecommitdiffstats
path: root/docs/scripts
diff options
context:
space:
mode:
authorJohn DeNisco <jdenisco@cisco.com>2020-03-20 10:03:47 -0400
committerDave Barach <openvpp@barachs.net>2020-03-23 12:05:40 +0000
commit727c653f1cac63590f28ca73619655c1c2d109fa (patch)
treef8474e3d128e2d8493a76dc59aa8991af6928fde /docs/scripts
parent1690dcb49527934e83748e7b6db8501b33c3758a (diff)
docs: Fix build on fresh ubuntu 18.04
Type: docs Signed-off-by: John DeNisco <jdenisco@cisco.com> Change-Id: If842c92183a9cf4b5a9773dced3298005b327e1a
Diffstat (limited to 'docs/scripts')
-rwxr-xr-xdocs/scripts/sphinx-make.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/docs/scripts/sphinx-make.sh b/docs/scripts/sphinx-make.sh
index 3dca88cd426..36596f219f5 100755
--- a/docs/scripts/sphinx-make.sh
+++ b/docs/scripts/sphinx-make.sh
@@ -2,10 +2,19 @@
if [ "$1" == "venv" ]
then
- python3 -m pip install --user virtualenv
+ OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
+ if [ "$OS_ID" == "ubuntu" ]
+ then
+ sudo apt-get install -y python3-pip
+ fi
+ if [ "$OS_ID" == "centos" ]
+ then
+ sudo yum install -y python3-pip
+ fi
+ pip3 install --user virtualenv
python3 -m virtualenv $VENV_DIR
source $VENV_DIR/bin/activate;
- python3 -m pip install -r $DOCS_DIR/etc/requirements.txt
+ pip3 install -r $DOCS_DIR/etc/requirements.txt
else
source $VENV_DIR/bin/activate;
VERSION=`source $WS_ROOT/src/scripts/version`