corda/docs/install-docsite-requirements.sh
Clinton Alexander 8862920f9a Removed docs build directory from repo.
Make docsite is back in a shell file due to issues invokving outside of the virtualenv.
2017-03-30 12:22:59 +01:00

32 lines
825 B
Bash
Executable File

#!/usr/bin/env bash
# The purpose of this file is to install the requirements for the docsite
# You can call it manually if running make manually, otherwise gradle will run it for you
set -xeo pipefail
# Install the virtualenv
if [ ! -d "virtualenv" ]
then
# Check if python2.7 is installed explicitly otherwise fall back to the default python
if type "python2.7" > /dev/null; then
virtualenv -p python2.7 virtualenv
else
virtualenv virtualenv
fi
fi
# Activate the virtualenv
if [ -d "virtualenv/bin" ]
then
# it's a Unix system
source virtualenv/bin/activate
else
source virtualenv/Scripts/activate
fi
# Install PIP requirements
if [ ! -d "virtualenv/lib/python2.7/site-packages/sphinx" ]
then
echo "Installing pip dependencies ... "
pip install -r requirements.txt
fi