cfg/bin/update-gotools

45 lines
882 B
Plaintext
Raw Normal View History

#!/bin/bash
set -eux
set -o pipefail
2016-07-21 13:48:49 +00:00
export GOPATH="${HOME}/gocode"
INSTALLS=(
# Go-dev related tools
'github.com/alecthomas/gometalinter'
'github.com/golang/dep/cmd/dep'
'github.com/mailgun/godebug'
'github.com/nsf/gocode'
'github.com/shuLhan/go-bindata/...'
'github.com/tools/godep'
# Vault related tools
'github.com/hashicorp/vault'
'github.com/Luzifer/vault2env'
'github.com/Luzifer/vault-patch'
# Other tools
'github.com/fatih/hclfmt'
'github.com/fiatjaf/jiq/cmd/jiq'
'github.com/hashicorp/packer'
'github.com/Luzifer/password'
'github.com/Luzifer/short_path'
)
rm -rf ${GOPATH}
mkdir -p ${GOPATH}
2016-07-21 13:48:49 +00:00
# Create `.gopath` file for $PATH detection
touch ${GOPATH}/.gopath
for gp in ${INSTALLS[@]}; do
go get ${gp} &
done
wait
# Ensure installed tools can work
2016-07-21 13:48:49 +00:00
${GOPATH}/bin/gometalinter --install --update
vim +:GoInstallBinaries +:qall
2016-07-21 13:48:49 +00:00