From 260bc98d92cbd2d2927d92cc520e426534ae1d3e Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Mon, 20 May 2024 00:24:47 +0100 Subject: [PATCH] Tools: scripts: generate_lua_docs: check for local lua-language-server --- Tools/scripts/generate_lua_docs.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Tools/scripts/generate_lua_docs.sh b/Tools/scripts/generate_lua_docs.sh index 930b042761..3ecc4fc9e6 100755 --- a/Tools/scripts/generate_lua_docs.sh +++ b/Tools/scripts/generate_lua_docs.sh @@ -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