From d551062ec4cf33b73df4e0d38671cbe6ca03abc5 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 6 Aug 2003 09:35:05 +0000 Subject: * Scan for wget and use the full path in fetchurl.sh. * Use nix-hash (not md5sum) in fetchurl.sh. --- corepkgs/fetchurl/fetchurl.sh | 10 ---------- corepkgs/fetchurl/fetchurl.sh.in | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 corepkgs/fetchurl/fetchurl.sh create mode 100644 corepkgs/fetchurl/fetchurl.sh.in (limited to 'corepkgs') diff --git a/corepkgs/fetchurl/fetchurl.sh b/corepkgs/fetchurl/fetchurl.sh deleted file mode 100644 index 7b6243974d3f..000000000000 --- a/corepkgs/fetchurl/fetchurl.sh +++ /dev/null @@ -1,10 +0,0 @@ -#! /bin/sh - -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 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 -- cgit 1.4.1