-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathupdate-docs.sh
32 lines (26 loc) · 1.04 KB
/
update-docs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
DOCS_ROOT=`pwd`
if [ "$1" == "" ]; then
echo "Call the script with the path to the server repo."
exit 1
fi
cd $1
SERVER_ROOT=`pwd`
./pythia.sh documentation_website
cp -r build-py3/doc_source $DOCS_ROOT/src/
cp extension/* $DOCS_ROOT/extension/
cp -r build-py3/lib/python3.11/site-packages/sftpplus_website/sphinx $DOCS_ROOT
echo "Creating extensions for $DOCS_ROOT ..."
mkdir -p $DOCS_ROOT/chevah/server/extension
touch $DOCS_ROOT/chevah/__init__.py
touch $DOCS_ROOT/chevah/server/__init__.py
touch $DOCS_ROOT/chevah/server/extension/__init__.py
cp chevah/server/extension/auth_ldap_noop.py $DOCS_ROOT/chevah/server/extension/
cd $DOCS_ROOT
rm -rf venv/lib/python3.11/site-packages/chevah
cp -r chevah venv/lib/python3.11/site-packages/
sed 's/^templates_path.*/templates_path = ["..\/..\/sphinx"]/'g -i src/doc_source/conf.py
sed 's/^html_theme_path.*/html_theme_path = ["..\/..\/sphinx"]/'g -i src/doc_source/conf.py
rm -rf deploy
. venv/bin/activate
pip install -r requirements.txt
sphinx-build -b html --keep-going -W src/doc_source/ deploy