Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at flake-libs 47 lines 1.1 kB view raw
1#!/usr/bin/env bash 2set -euo pipefail 3 4# All rust-related downloads can be found at 5# https://static.rust-lang.org/dist/index.html. To find the date on 6# which a particular thing was last updated, look for the *-date.txt 7# file, e.g. 8# https://static.rust-lang.org/dist/channel-rust-beta-date.txt 9 10PLATFORMS=( 11 i686-unknown-linux-gnu 12 x86_64-unknown-linux-gnu 13 x86_64-unknown-linux-musl 14 arm-unknown-linux-gnueabihf 15 armv7-unknown-linux-gnueabihf 16 aarch64-unknown-linux-gnu 17 aarch64-unknown-linux-musl 18 x86_64-apple-darwin 19 aarch64-apple-darwin 20 powerpc64le-unknown-linux-gnu 21 riscv64gc-unknown-linux-gnu 22 s390x-unknown-linux-gnu 23 loongarch64-unknown-linux-gnu 24 loongarch64-unknown-linux-musl 25 x86_64-unknown-freebsd 26) 27BASEURL=https://static.rust-lang.org/dist 28VERSION=${1:-} 29DATE=${2:-} 30 31if [[ -z $VERSION ]] 32then 33 echo "No version supplied" 34 exit -1 35fi 36 37if [[ -n $DATE ]] 38then 39 BASEURL=$BASEURL/$DATE 40fi 41 42for PLATFORM in "${PLATFORMS[@]}" 43do 44 URL="$BASEURL/rust-$VERSION-$PLATFORM.tar.gz.sha256" 45 SHA256=$(curl -sSfL $URL | cut -d ' ' -f 1) 46 echo "$PLATFORM = \"$SHA256\";" 47done