vim-go-tools/build.sh

16 lines
333 B
Bash
Raw Normal View History

#!/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