summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-05-29 18:41:07 +0800
committersumneko <sumneko@hotmail.com>2019-05-29 18:41:07 +0800
commit5a7a0a61bf27adb65272082cb27883e1ea15e3a6 (patch)
tree55294fd44d5a0532058560e850ef7745804e4b16
parent35dea6e862b9c27af8b919eaa0c9559fb496f8cc (diff)
downloadlua-language-server-5a7a0a61bf27adb65272082cb27883e1ea15e3a6.zip
测试
-rwxr-xr-xlinux.sh25
-rwxr-xr-xosx.sh25
2 files changed, 26 insertions, 24 deletions
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."
diff --git a/osx.sh b/osx.sh
index b8f1c61c..8c3fa0fb 100755
--- a/osx.sh
+++ b/osx.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."