-
Notifications
You must be signed in to change notification settings - Fork 43
/
build_submodules.sh
executable file
·40 lines (30 loc) · 1.25 KB
/
build_submodules.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
33
34
35
36
37
38
39
40
#!/bin/bash
set -xe -o pipefail -o nounset
project_root=$(pwd)
# Translations
po_dest="${project_root}/locale/ru/LC_MESSAGES"
# Copy Building Tarantool Docs guide
cp README.rst doc/contributing/docs/_includes/README.rst
# Luatest
luatest_root="${project_root}/modules/luatest"
luatest_dest="${project_root}/doc/reference/reference_rock/luatest"
# Generate Luatest docs
cd "${luatest_root}"
ldoc --ext=rst --dir=rst --toctree="API" .
# Copy Luatest docs to the right place
cd "${luatest_dest}"
cp -fa "${luatest_root}/rst/." "${luatest_dest}"
cp "${luatest_root}/README.rst" "${luatest_dest}"
mkdir -p "${luatest_dest}/_includes/"
mv -fv "${luatest_dest}/index.rst" "${luatest_dest}/_includes/"
# Tarantool C++ connector
tntcxx_root="${project_root}/modules/tntcxx"
tntcxx_howto_dest="${project_root}/doc/connector"
tntcxx_api_dest="${project_root}/doc/connector"
# Copy Tarantool C++ connector docs to the right places
mkdir -p "${tntcxx_api_dest}/cxx/"
mkdir -p "${tntcxx_howto_dest}/cxx/"
mkdir -p "${tntcxx_howto_dest}/cxx/_includes/"
cp -rfv "${tntcxx_root}/doc/tntcxx_getting_started.rst" "${tntcxx_howto_dest}/cxx/"
cp -rfv "${tntcxx_root}/examples/" "${tntcxx_howto_dest}/cxx/_includes/examples/"
cp -rfv "${tntcxx_root}/doc/tntcxx_api.rst" "${tntcxx_api_dest}/cxx/"