From 915dfc3b4e209a255242a929147b19f376626ef6 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Tue, 17 Dec 2019 00:52:46 +0900 Subject: Install loacal --- installer/install-solargraph.cmd | 14 +++++++++++++- installer/install-solargraph.sh | 17 ++++++++++++++++- 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 < solargraph +#!/bin/sh + +DIR=\$(cd \$(dirname \$0); pwd) +bundle exec ruby \$DIR/bin/solargraph stdio +EOF + +chmod +x solargraph -- cgit v1.2.3-54-g00ecf