1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-13 04:21:04 +01:00

* Fetchurl: check md5 checksum.

This commit is contained in:
Eelco Dolstra 2003-07-12 11:03:14 +00:00
parent 73b163c1a1
commit 5304a1eb3a
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,10 @@
#! /bin/sh
wget "$url" -O "$out"
echo "downloading $url into $out..."
wget "$url" -O "$out" || exit 1
actual=$(md5sum -b $out | cut -c1-32)
if ! test "$actual" == "$md5"; then
echo "hash is $actual, expected $md5"
exit 1
fi