diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-08-06T09·35+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-08-06T09·35+0000 |
commit | d551062ec4cf33b73df4e0d38671cbe6ca03abc5 (patch) | |
tree | a0e2db4d6f42379eb7929fd1ad8eaf827afc0ac4 /corepkgs/fetchurl/fetchurl.sh.in | |
parent | 236eb59293194071ac518c12d0cc6fe0a3f0ac5f (diff) |
* Scan for wget and use the full path in fetchurl.sh.
* Use nix-hash (not md5sum) in fetchurl.sh.
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 000000000000..dc92c7ee50d8 --- /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 |