X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=docs%2Fscripts%2Fsphinx-make.sh;h=36596f219f53e0dc56b6c5e9491d27c81ccfd9e4;hb=727c653f1cac63590f28ca73619655c1c2d109fa;hp=3dca88cd426f695e017be8f8f4820cbbd4660e6a;hpb=1690dcb49527934e83748e7b6db8501b33c3758a;p=vpp.git 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`