CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/Tools/scripts/generate_lua_docs.sh
Views: 1798
1
#!/usr/bin/env bash
2
# Generate md file from lua docs with lua-language-sever
3
4
cd "$(dirname "$0")"
5
cd ../..
6
7
if [ -n "$(ls -A lualogs)" ]; then
8
echo "lualogs Not Empty"
9
exit 1
10
fi
11
12
if [ -e "lua-language-server/bin/lua-language-server" ]; then
13
LLS_PATH=$(realpath lua-language-server/bin/lua-language-server)
14
else
15
LLS_PATH=lua-language-server
16
fi
17
18
# Need to use abs paths due to lua-language-sever bug
19
CONFIG_PATH=$(realpath libraries/AP_Scripting/tests/docs.json)
20
DOC_PATH=$(realpath libraries/AP_Scripting/docs/)
21
22
${LLS_PATH} --configpath ${CONFIG_PATH} --logpath lualogs --doc ${DOC_PATH}
23
24
mv lualogs/doc.md ScriptingDocs.md
25
rm -r lualogs
26
27