summaryrefslogtreecommitdiff
path: root/linux.sh
diff options
context:
space:
mode:
Diffstat (limited to 'linux.sh')
-rwxr-xr-xlinux.sh25
1 files changed, 13 insertions, 12 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."