mirror of https://github.com/ArduPilot/ardupilot
Tools: scripts: generate_lua_docs: check for local lua-language-server
This commit is contained in:
parent
b8312e76b7
commit
260bc98d92
|
@ -9,11 +9,17 @@ if [ -n "$(ls -A lualogs)" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -e "lua-language-server/bin/lua-language-server" ]; then
|
||||||
|
LLS_PATH=$(realpath lua-language-server/bin/lua-language-server)
|
||||||
|
else
|
||||||
|
LLS_PATH=lua-language-server
|
||||||
|
fi
|
||||||
|
|
||||||
# Need to use abs paths due to lua-language-sever bug
|
# Need to use abs paths due to lua-language-sever bug
|
||||||
CONFIG_PATH=$(realpath libraries/AP_Scripting/tests/docs.json)
|
CONFIG_PATH=$(realpath libraries/AP_Scripting/tests/docs.json)
|
||||||
DOC_PATH=$(realpath libraries/AP_Scripting/docs/)
|
DOC_PATH=$(realpath libraries/AP_Scripting/docs/)
|
||||||
|
|
||||||
lua-language-server --configpath ${CONFIG_PATH} --logpath lualogs --doc ${DOC_PATH}
|
${LLS_PATH} --configpath ${CONFIG_PATH} --logpath lualogs --doc ${DOC_PATH}
|
||||||
|
|
||||||
mv lualogs/doc.md ScriptingDocs.md
|
mv lualogs/doc.md ScriptingDocs.md
|
||||||
rm -r lualogs
|
rm -r lualogs
|
||||||
|
|
Loading…
Reference in New Issue