aboutsummaryrefslogtreecommitdiffstats
path: root/docs/scripts
diff options
context:
space:
mode:
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`