forked from JGuillaumin/keras-doc-pdf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
30 lines (23 loc) · 789 Bytes
/
run.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
#!/bin/bash
. activate keras-doc
if [ $1 == "master" ] || [[ $1 =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]
then
echo "version : $1"
pip install tensorflow mkdocs mkdocs-pandoc markdown==2.6.7
# clone and checkout the correct versison of Keras
cd /tmp/
git clone https://github.com/keras-team/keras.git
cd keras/
git fetch --all --tags
git checkout $1
# install Keras and generate the documentation
python setup.py install
cd docs/
python autogen.py
# convert to 1 large pandoc file, then into a PDF file
mkdocs2pandoc > /src/keras-"$1"-doc.pd
pandoc --toc --latex-engine=xelatex -f markdown+grid_tables+table_captions -o /src/keras-"$1"-doc.pdf /src/keras-"$1"-doc.pd
else
echo "will exec $@"
exec "$@"
fi