vim-go-tools/build.sh
Knut Ahlers 1b560369fc
Fix builds, force usage of go modules
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2020-05-31 16:19:19 +02:00

15 lines
333 B
Bash

#!/bin/bash
set -euo pipefail
# Force module mode to support "@version" syntax
export GO111MODULE=on
# Remove mod-cache on exit as its permissions are FUBAR
trap "go clean -modcache" EXIT
packages=($(cat tools.txt))
for package in "${packages[@]}"; do
echo -e "\e[96mBuilding ${package}...\e[m" >&2
go get -v "${package}"
done