lix/corepkgs/nar/nar.sh
Eelco Dolstra 54664b6fb7 * The write() system call can write less than the requested
number of bytes, e.g., in case of a signal like SIGSTOP.  
  This caused `nix --dump' to fail sometimes.

  Note that this bug went unnoticed because the call to `nix 
  --dump' is in a pipeline, and the shell ignores non-zero 
  exit codes from all but the last element in the pipeline.  
  Is there any way to check the result of the initial elements
  in the pipeline?  (In other words, is it at all possible to 
  write reliable shell scripts?)
2003-07-16 21:24:02 +00:00

6 lines
107 B
Bash

#! /bin/sh
echo "packing $path into $out..."
/nix/bin/nix --dump --file "$path" | bzip2 > $out || exit 1