Wrong tar flag on darwin
The proper flag for xz decompression is J
not z
, which is for gzip (bzip is lower case j
).
I suspect the motivation for piping uncompressed archives into tar is compatibility? Why not stick to tar's bundled-flags
form of arguments if that's the case? I.e., drop the -
in -xf
.
I believe every version of tar on mac os that can handle xz compression also does automatic compression detection so it should be possible to simplify the command for darwin to tar xf
for all cases. (I haven't bothered verifying my claim but considering most mac os users update fairly regularly I'd risk breaking it for older versions and waiting for a new issue report.)