diff options
Diffstat (limited to 'linux.sh')
-rwxr-xr-x | linux.sh | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -4,11 +4,6 @@ set -e MY_DIR=$(cd "$(dirname $0)";pwd) INSTALL_PATH=`find ~/.vscode/extensions -name "sumneko.lua-*" | sort -r | head -1` -if [ -d "$INSTALL_PATH" ]; then - echo "found install path" -else - echo "please install sumneko Lua in VScode Marketplace first." -fi cd $MY_DIR @@ -23,13 +18,19 @@ cd - echo "build binary ..." ./3rd/luamake/luamake -echo "Try to install lua-language-server for you:" -cp server/bin/lua-language-server "${INSTALL_PATH}/server/bin" -cp server/bin/*.so "${INSTALL_PATH}/server/bin" +if [ -d "$INSTALL_PATH" ]; then + echo "Try to install lua-language-server for you:" + cp server/bin "${INSTALL_PATH}/server" -echo "Test ..." -${INSTALL_PATH}/server/bin/lua-language-server ${INSTALL_PATH}/server/test.lua + echo "Test ..." + ${INSTALL_PATH}/server/bin/lua-language-server ${INSTALL_PATH}/server/test.lua -echo "installed." -echo "please restart VScode and enjoy." + echo "installed." + echo "please restart VScode and enjoy." +else + echo "Test ..." + ./server/bin/lua-language-server ./server/test.lua + + echo "please install sumneko Lua in VScode Marketplace first." +fi echo "Done." |