* Check exit status of pipe elements.

This commit is contained in:
Eelco Dolstra 2004-11-08 11:32:10 +00:00
parent b8aaef5e4e
commit d6db574ec1
1 changed files with 2 additions and 0 deletions

View File

@ -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