From d6db574ec127757c05c24f53c71e4116caaa762b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 8 Nov 2004 11:32:10 +0000 Subject: * Check exit status of pipe elements. --- corepkgs/nar/nar.sh.in | 2 ++ 1 file changed, 2 insertions(+) (limited to 'corepkgs') diff --git a/corepkgs/nar/nar.sh.in b/corepkgs/nar/nar.sh.in index 9635d29f4f..11344f7fff 100644 --- a/corepkgs/nar/nar.sh.in +++ b/corepkgs/nar/nar.sh.in @@ -8,6 +8,8 @@ mkdir $out dst=$out/$(basename $path).nar.bz2 @bindir@/nix-store --dump "$path" | @bzip2@ > $dst +if test "${PIPESTATUS[0]}" != "0"; then exit 1; fi + md5=$(md5sum -b $dst | cut -c1-32) if test $? != 0; then exit 1; fi echo $md5 > $out/md5 -- cgit 1.4.1