1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-11 15:15:36 +00:00
nixpkgs/pkgs/build-support/fetchurl/builder.sh
Eelco Dolstra 7bf54b734e * Follow redirects.
svn path=/nixpkgs/trunk/; revision=899
2004-04-01 19:10:37 +00:00

14 lines
250 B
Bash

. $stdenv/setup
header "downloading $out from $url"
curl --fail --location --max-redirs 20 "$url" > "$out"
actual=$(md5sum -b "$out" | cut -c1-32)
if test "$actual" != "$md5"; then
echo "hash is $actual, expected $md5"
exit 1
fi
stopNest