Enable and document the -Z option for selecting "compress" compression,
now that libarchive supports it.
This commit is contained in:
parent
4c7ea30e33
commit
4d2ae21512
@ -405,6 +405,15 @@ Note that, unlike other
|
||||
.Nm tar
|
||||
implementations, this implementation recognizes gzip compression
|
||||
automatically when reading archives.
|
||||
.It Fl Z
|
||||
(c mode only)
|
||||
Compress the resulting archive with
|
||||
.Xr compress 1 .
|
||||
In extract or list modes, this option is ignored.
|
||||
Note that, unlike other
|
||||
.Nm tar
|
||||
implementations, this implementation recognizes compress compression
|
||||
automatically when reading archives.
|
||||
.El
|
||||
.Sh ENVIRONMENT
|
||||
The following environment variables affect the execution of
|
||||
@ -628,6 +637,7 @@ an archive while preserving any absolute pathnames,
|
||||
components, or symlinks to other directories.
|
||||
.Sh SEE ALSO
|
||||
.Xr bzip2 1 ,
|
||||
.Xr compress 1 ,
|
||||
.Xr cpio 1 ,
|
||||
.Xr gzip 1 ,
|
||||
.Xr mt 1 ,
|
||||
|
@ -624,11 +624,6 @@ main(int argc, char **argv)
|
||||
if (bsdtar->option_warn_links)
|
||||
only_mode(bsdtar, "--check-links", "cr");
|
||||
|
||||
/* Check other parameters only permitted in certain modes. */
|
||||
if (bsdtar->create_compression == 'Z' && bsdtar->mode == 'c') {
|
||||
bsdtar_warnc(bsdtar, 0, ".Z compression not supported");
|
||||
usage(bsdtar);
|
||||
}
|
||||
if (bsdtar->create_compression != '\0') {
|
||||
strcpy(buff, "-?");
|
||||
buff[1] = bsdtar->create_compression;
|
||||
|
@ -220,6 +220,9 @@ tar_mode_c(struct bsdtar *bsdtar)
|
||||
archive_write_set_compression_gzip(a);
|
||||
break;
|
||||
#endif
|
||||
case 'Z':
|
||||
archive_write_set_compression_compress(a);
|
||||
break;
|
||||
default:
|
||||
bsdtar_errc(bsdtar, 1, 0,
|
||||
"Unrecognized compression option -%c",
|
||||
|
Loading…
Reference in New Issue
Block a user