Add latest stable Go version to tools file

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-05-07 16:38:08 +02:00
parent c402753e55
commit 9237b9224f
Signed by: luzifer
GPG key ID: D91C3E91E4CAD6F5
2 changed files with 12 additions and 9 deletions

View file

@ -7,9 +7,9 @@ export GO111MODULE=on
# Remove mod-cache on exit as its permissions are FUBAR
trap "go clean -modcache" EXIT
packages=($(cat tools.txt))
packages=($(grep -v "^#" tools.txt))
for package in "${packages[@]}"; do
echo -e "\e[96mBuilding ${package}...\e[m" >&2
go install "${package}"
echo -e "\e[96mBuilding ${package}...\e[m" >&2
go install "${package}"
done

View file

@ -1,15 +1,18 @@
#!/bin/bash
set -euo pipefail
curl -sSf https://archlinux.org/packages/community/x86_64/go/json/ |
jq -r '"# " + .pkgname + " v" + .pkgver + "-" + .pkgrel' >tools.txt.new
curl -sSfL "https://raw.githubusercontent.com/fatih/vim-go/master/plugin/go.vim" |
grep -Eo "\\ \['[^']*/[^']*'" |
tr -d "[' " |
sort >tools.txt.new
grep -Eo "\\ \['[^']*/[^']*'" |
tr -d "[' " |
sort >>tools.txt.new
diff tools.txt tools.txt.new && {
echo "Up to date"
rm tools.txt.new
exit 0
echo "Up to date"
rm tools.txt.new
exit 0
} || true
mv tools.txt.new tools.txt