Add latest stable Go version to tools file
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
c402753e55
commit
9237b9224f
2 changed files with 12 additions and 9 deletions
6
build.sh
6
build.sh
|
@ -7,9 +7,9 @@ export GO111MODULE=on
|
||||||
# Remove mod-cache on exit as its permissions are FUBAR
|
# Remove mod-cache on exit as its permissions are FUBAR
|
||||||
trap "go clean -modcache" EXIT
|
trap "go clean -modcache" EXIT
|
||||||
|
|
||||||
packages=($(cat tools.txt))
|
packages=($(grep -v "^#" tools.txt))
|
||||||
|
|
||||||
for package in "${packages[@]}"; do
|
for package in "${packages[@]}"; do
|
||||||
echo -e "\e[96mBuilding ${package}...\e[m" >&2
|
echo -e "\e[96mBuilding ${package}...\e[m" >&2
|
||||||
go install "${package}"
|
go install "${package}"
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
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" |
|
curl -sSfL "https://raw.githubusercontent.com/fatih/vim-go/master/plugin/go.vim" |
|
||||||
grep -Eo "\\ \['[^']*/[^']*'" |
|
grep -Eo "\\ \['[^']*/[^']*'" |
|
||||||
tr -d "[' " |
|
tr -d "[' " |
|
||||||
sort >tools.txt.new
|
sort >>tools.txt.new
|
||||||
|
|
||||||
diff tools.txt tools.txt.new && {
|
diff tools.txt tools.txt.new && {
|
||||||
echo "Up to date"
|
echo "Up to date"
|
||||||
rm tools.txt.new
|
rm tools.txt.new
|
||||||
exit 0
|
exit 0
|
||||||
} || true
|
} || true
|
||||||
|
|
||||||
mv tools.txt.new tools.txt
|
mv tools.txt.new tools.txt
|
||||||
|
|
Loading…
Reference in a new issue