On 01/16/2015 08:01 AM, Dimitrios Apostolou wrote:
Relevant output from "make V=1 dist":
tardir=cfengine-3.7.0a1.5ffcc54 && tar --format=ustar -chf - "$tardir" |
GZIP=--best gzip -c >cfengine-3.7.0a1.5ffcc54.tar.gz
It is portable to do something hairy like:
{ tar ...; echo $? > file; } | gzip ...
inspect file
It is even possible to avoid an intermediate file with even hairier exec
operations to shuffle fds around.
It may be simpler to break things into two steps, with an intermediate
file instead of a pipeline, although I'm not sure it would be efficient.
But you definitely make a point that we should fix things to detect tar
failure.