tutanota-desktop: 259.250108.1 -> 266.250202.0 (#377234)
[NixPkgs.git] / pkgs / development / compilers / go / print-hashes.sh
blobbd35b0b69f66e3b546b84e80d6cd7b8c5cc95027
1 #!/usr/bin/env nix-shell
2 #! nix-shell -i bash -p curl jq
3 # shellcheck shell=bash
4 set -euo pipefail
6 BASEURL=https://go.dev/dl/
7 VERSION=${1:-}
9 if [[ -z ${VERSION} ]]; then
10 echo "No version supplied"
11 exit 1
14 curl -s "${BASEURL}?mode=json&include=all" |
15 jq '.[] | select(.version == "go'"${VERSION}"'")' |
16 jq -r '.files[] | select(.kind == "archive" and (.os == "linux" or .os == "darwin" or .os == "freebsd")) | (.os + "-" + .arch + " = \"" + .sha256 + "\";")'