From 5a7a0a61bf27adb65272082cb27883e1ea15e3a6 Mon Sep 17 00:00:00 2001 From: sumneko Date: Wed, 29 May 2019 18:41:07 +0800 Subject: =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linux.sh | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'linux.sh') diff --git a/linux.sh b/linux.sh index b92fdfda..87f766d1 100755 --- a/linux.sh +++ b/linux.sh @@ -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." -- cgit v1.2.3