2021-07-11 21:20:58 -04:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
|
|
current_path="$PWD"
|
2021-10-04 13:42:41 -04:00
|
|
|
server_path="${XDG_DATA_HOME:-$HOME/.local/share}/nvim/lsp/sumneko_lua"
|
2021-07-11 21:20:58 -04:00
|
|
|
|
|
|
|
# Clone / Update
|
2021-10-04 13:42:41 -04:00
|
|
|
if [ -d "${server_path}" ]; then
|
|
|
|
cd ${server_path}
|
2021-07-11 21:20:58 -04:00
|
|
|
git pull --rebase
|
|
|
|
else
|
2021-10-04 13:42:41 -04:00
|
|
|
git clone https://github.com/sumneko/lua-language-server.git ${server_path}
|
2021-07-11 21:20:58 -04:00
|
|
|
fi
|
|
|
|
|
2021-10-04 13:42:41 -04:00
|
|
|
cd ${server_path}
|
2021-07-11 21:20:58 -04:00
|
|
|
git submodule update --init --recursive
|
|
|
|
|
|
|
|
# Build
|
|
|
|
cd 3rd/luamake
|
|
|
|
./compile/install.sh
|
|
|
|
cd ../..
|
|
|
|
./3rd/luamake/luamake rebuild
|
|
|
|
|
2021-09-03 15:15:41 -04:00
|
|
|
# The build process automatically exports path to `~/.profile`
|
|
|
|
rm -rf ~/.profile
|
|
|
|
|
2021-10-04 13:42:41 -04:00
|
|
|
cd ${current_path}
|