nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 49 lines 1.2 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 powerpc64-unknown-linux-gnu 21 powerpc64le-unknown-linux-gnu 22 powerpc64le-unknown-linux-musl 23 riscv64gc-unknown-linux-gnu 24 s390x-unknown-linux-gnu 25 loongarch64-unknown-linux-gnu 26 loongarch64-unknown-linux-musl 27 x86_64-unknown-freebsd 28) 29BASEURL=https://static.rust-lang.org/dist 30VERSION=${1:-} 31DATE=${2:-} 32 33if [[ -z $VERSION ]] 34then 35 echo "No version supplied" 36 exit -1 37fi 38 39if [[ -n $DATE ]] 40then 41 BASEURL=$BASEURL/$DATE 42fi 43 44for PLATFORM in "${PLATFORMS[@]}" 45do 46 URL="$BASEURL/rust-$VERSION-$PLATFORM.tar.gz.sha256" 47 SHA256=$(curl -sSfL $URL | cut -d ' ' -f 1) 48 echo "$PLATFORM = \"$SHA256\";" 49done