aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTsuyoshi CHO <Tsuyoshi.CHO@Gmail.com>2020-01-30 05:29:12 +0900
committerTsuyoshi CHO <Tsuyoshi.CHO@Gmail.com>2020-01-30 05:29:12 +0900
commit9e538b4b23436cd0373711e9d4eadefda5bc74d6 (patch)
tree151cbe0479ea5f9f3e47e4c372b57b9f9ba5b65d
parentf76f655e5733ec766db2d627c6ec01beeade3590 (diff)
downloadvim-lsp-settings-9e538b4b23436cd0373711e9d4eadefda5bc74d6.tar.gz
vim-lsp-settings-9e538b4b23436cd0373711e9d4eadefda5bc74d6.tar.bz2
vim-lsp-settings-9e538b4b23436cd0373711e9d4eadefda5bc74d6.zip
improve: go install packages
-rw-r--r--installer/go_install.cmd18
-rwxr-xr-xinstaller/go_install.sh7
-rw-r--r--installer/install-efm-langserver.cmd2
-rwxr-xr-xinstaller/install-efm-langserver.sh4
-rw-r--r--installer/install-gopls.cmd5
-rwxr-xr-xinstaller/install-gopls.sh3
6 files changed, 12 insertions, 27 deletions
diff --git a/installer/go_install.cmd b/installer/go_install.cmd
index b4200ad..fbd63c2 100644
--- a/installer/go_install.cmd
+++ b/installer/go_install.cmd
@@ -1,18 +1,8 @@
@echo off
if "x%1" equ "x" goto :EOF
-if "x%2" equ "x" goto :EOF
-setlocal
-
-set GOPATH=%CD%\go
-
-go get %2
-
-echo @echo off ^
-
-%%~dp0\go\bin\%1.exe %%* ^
-
-> %1.cmd
-
-endlocal
+set GOPATH=%cd%
+set GOBIN=%cd%
+go get -v -u %1
+rd /S /Q "src"
diff --git a/installer/go_install.sh b/installer/go_install.sh
index d60925b..5a682a7 100755
--- a/installer/go_install.sh
+++ b/installer/go_install.sh
@@ -1,10 +1,9 @@
#!/bin/bash
# Usage
-# $ go_install [EXECUTABLE_NAME] [GO_GET_URLPATH]
+# $ go_install [GO_GET_URLPATH]
set -e
-GOPATH=$(pwd)/go
-go get "$2"
-ln -s "./go/bin/$1" .
+GOPATH=$(pwd) GOBIN=$(pwd) GO111MODULE=on go get -v -up$1
+rm -rf src
diff --git a/installer/install-efm-langserver.cmd b/installer/install-efm-langserver.cmd
index 9bf3110..fc692b9 100644
--- a/installer/install-efm-langserver.cmd
+++ b/installer/install-efm-langserver.cmd
@@ -1,3 +1,3 @@
@echo off
-call "%~dp0\go_install.cmd" efm-langserver github.com/mattn/efm-langserver
+call "%~dp0\go_install.cmd" github.com/mattn/efm-langserver
diff --git a/installer/install-efm-langserver.sh b/installer/install-efm-langserver.sh
index d967fa5..be25db8 100755
--- a/installer/install-efm-langserver.sh
+++ b/installer/install-efm-langserver.sh
@@ -1,5 +1,5 @@
-#!/bin/bash
+#!/bin/sh
set -e
-"$(dirname $0)/go_install.sh" efm-langserver github.com/mattn/efm-langserver
+"$(dirname $0)/go_install.sh" github.com/mattn/efm-langserver
diff --git a/installer/install-gopls.cmd b/installer/install-gopls.cmd
index 844762e..444e1ae 100644
--- a/installer/install-gopls.cmd
+++ b/installer/install-gopls.cmd
@@ -1,6 +1,3 @@
@echo off
-set GOPATH=%cd%
-set GOBIN=%cd%
-go get -v -u golang.org/x/tools/gopls
-rd /S /Q "src"
+call "%~dp0\go_install.cmd" golang.org/x/tools/gopls
diff --git a/installer/install-gopls.sh b/installer/install-gopls.sh
index 22e0b1c..c6cee83 100755
--- a/installer/install-gopls.sh
+++ b/installer/install-gopls.sh
@@ -2,5 +2,4 @@
set -e
-GOPATH=$(pwd) GOBIN=$(pwd) GO111MODULE=on go get -v golang.org/x/tools/gopls@latest
-rm -rf src
+"$(dirname $0)/go_install.sh" golang.org/x/tools/gopls@latest