Tools: scripts: generate_lua_docs: check for local lua-language-server

This commit is contained in:
Iampete1 2024-05-20 00:24:47 +01:00 committed by Andrew Tridgell
parent b8312e76b7
commit 260bc98d92
1 changed files with 7 additions and 1 deletions

View File

@ -9,11 +9,17 @@ if [ -n "$(ls -A lualogs)" ]; then
exit 1
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
CONFIG_PATH=$(realpath libraries/AP_Scripting/tests/docs.json)
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
rm -r lualogs