1
0
Fork 0
mirror of synced 2024-12-26 00:33:20 -05:00
ultimate-vim/sources_non_forked/vim-go/scripts/install-tools

36 lines
1.1 KiB
Text
Raw Normal View History

2022-05-27 08:16:55 -04:00
#!/bin/sh
#
# Install and setup a Vim or Neovim for running tests.
# This should work on both GitHub Actions and people's desktop computers, and
# be 100% independent from any system installed Vim.
#
set -euC
vimgodir=$(cd -P "$(dirname "$0")/.." > /dev/null && pwd)
cd "$vimgodir"
vim=${1:-}
installdir="/tmp/vim-go-test/$1-install"
# Make sure all Go tools and other dependencies are installed.
echo "Installing Go binaries"
export GOPATH=$installdir
export GO111MODULE=on
export PATH="${GOPATH}/bin:$PATH"
"$vimgodir/scripts/run-vim" $vim +':silent :GoUpdateBinaries' +':qa'
echo "Installing lint tools"
(
mkdir -p "$installdir/share/vim/vimgo/pack/vim-go/start/"
cd "$installdir/share/vim/vimgo/pack/vim-go/start/"
[ -d "vim-vimhelplint" ] || git clone --depth 1 --quiet https://github.com/machakann/vim-vimhelplint
[ -d "vim-vimlparser" ] || git clone --depth 1 --quiet https://github.com/ynkdir/vim-vimlparser
[ -d "vim-vimlint" ] || git clone --depth 1 --quiet https://github.com/syngan/vim-vimlint
)
echo "vim-go tools installed to: $installdir/share/vim/vimgo/pack/vim-go/start"
# vim:ts=2:sts=2:sw=2:et