aboutsummaryrefslogtreecommitdiff
path: root/installer/install-solargraph.sh
diff options
context:
space:
mode:
Diffstat (limited to 'installer/install-solargraph.sh')
-rwxr-xr-xinstaller/install-solargraph.sh17
1 files changed, 16 insertions, 1 deletions
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