diff options
Diffstat (limited to 'corepkgs/fetchurl/fetchurl.sh.in')
-rw-r--r-- | corepkgs/fetchurl/fetchurl.sh.in | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/corepkgs/fetchurl/fetchurl.sh.in b/corepkgs/fetchurl/fetchurl.sh.in new file mode 100644 index 000000000..dc92c7ee5 --- /dev/null +++ b/corepkgs/fetchurl/fetchurl.sh.in @@ -0,0 +1,10 @@ +#! /bin/sh + +echo "downloading $url into $out..." +@wget@ "$url" -O "$out" || exit 1 + +actual=$(@bindir@/nix-hash --flat $out) +if ! test "$actual" == "$md5"; then + echo "hash is $actual, expected $md5" + exit 1 +fi |