aboutsummaryrefslogtreecommitdiff
path: root/installer
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2019-12-17 00:52:46 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2019-12-17 00:52:46 +0900
commit915dfc3b4e209a255242a929147b19f376626ef6 (patch)
tree13381071c1547cc46abe171fcd6fea7d79b56570 /installer
parent9a268fc46992cea9207eca627c77a6757a663f9e (diff)
downloadvim-lsp-settings-915dfc3b4e209a255242a929147b19f376626ef6.tar.gz
vim-lsp-settings-915dfc3b4e209a255242a929147b19f376626ef6.tar.bz2
vim-lsp-settings-915dfc3b4e209a255242a929147b19f376626ef6.zip
Install loacal
Diffstat (limited to 'installer')
-rw-r--r--installer/install-solargraph.cmd14
-rwxr-xr-xinstaller/install-solargraph.sh17
2 files changed, 29 insertions, 2 deletions
diff --git a/installer/install-solargraph.cmd b/installer/install-solargraph.cmd
index 0a1fa44..702fec6 100644
--- a/installer/install-solargraph.cmd
+++ b/installer/install-solargraph.cmd
@@ -1,3 +1,15 @@
@echo off
-gem install --user-install solargraph
+cd %~dp0
+if exist "..\servers\solargraph" rd /S /Q "..\servers\solargraph"
+md "..\servers\solargraph"
+cd "..\servers\solargraph"
+git clone "https://github.com/castwide/solargraph" .
+call bundle install --path vendor/bundle
+
+echo @echo off ^
+
+bundle exec ruby %%~dp0\bin/solargraph stdio ^
+
+> solargraph.cmd
+
diff --git a/installer/install-solargraph.sh b/installer/install-solargraph.sh
index 6c386f9..2171acc 100755
--- a/installer/install-solargraph.sh
+++ b/installer/install-solargraph.sh
@@ -1,4 +1,19 @@
#!/bin/sh
-gem install --user-install solargraph
+set -e
+cd $(dirname $0)
+[ -d ../servers/solargraph ] && rm -rf ../servers/solargraph
+mkdir ../servers/solargraph
+cd ../servers/solargraph
+git clone "https://github.com/castwide/solargraph" .
+call bundle install --path vendor/bundle
+
+cat <<EOF > solargraph
+#!/bin/sh
+
+DIR=\$(cd \$(dirname \$0); pwd)
+bundle exec ruby \$DIR/bin/solargraph stdio
+EOF
+
+chmod +x solargraph