-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathgendoc
executable file
·35 lines (33 loc) · 1.02 KB
/
gendoc
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
33
34
35
cp -rfp /root/work/zephyrproject/app .
find /root/work/zephyrproject/app -name README.rst | awk '{FS="/";print "cp "$0 " /root/work/pinetime-zephyr/manual/samples/" $5 $6 $7 $8}' > jj
chmod 777 jj
./jj
cd manual/samples
echo " .. _Samples:" > index.rst
echo " " >> index.rst
echo " " >> index.rst
echo " " >> index.rst
echo "Samples " >> index.rst
echo "####### " >> index.rst
echo " " >> index.rst
echo ".. toctree:: " >> index.rst
ls *rst |awk '{gsub(".rst",""); print " "$0}' >> /root/work/pinetime-zephyr/manual/samples/index.rst
cd ..
make clean
make markdown
make html
make latexpdf
make epub
cp _build/latex/*.pdf ..
cp _build/epub/*.epub ..
cp -rfp _build/markdown/* ../docs
cp -rfp _build/html ../docs
cd ../docs
echo "[view doc in html](html)" > index.md
find -name '*md' |sed -e 's,^\./,,' | awk '{print "["$1"]" "(" $1 ") "}' >> index.md
cd html
sed -i 's/_images/images/g' *html
sed -i 's/_static/images/g' *html
mv _images images
mv _static static
cp -rfp /root/work/zephyrproject/app /root/work/pinetime-zephyr