Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu/usr.bin/tar Add a `-y' option which filters archives thr...
details: https://anonhg.NetBSD.org/src/rev/9171f728b1b0
branches: trunk
changeset: 494301:9171f728b1b0
user: ad <ad%NetBSD.org@localhost>
date: Wed Jul 05 11:57:57 2000 +0000
description:
Add a `-y' option which filters archives through bzip2(1).
diffstat:
gnu/usr.bin/tar/tar.1 | 8 +++++++-
gnu/usr.bin/tar/tar.c | 19 ++++++++++++++++---
2 files changed, 23 insertions(+), 4 deletions(-)
diffs (96 lines):
diff -r 32bee5b30040 -r 9171f728b1b0 gnu/usr.bin/tar/tar.1
--- a/gnu/usr.bin/tar/tar.1 Wed Jul 05 11:46:40 2000 +0000
+++ b/gnu/usr.bin/tar/tar.1 Wed Jul 05 11:57:57 2000 +0000
@@ -3,7 +3,7 @@
.\"
.\" Written by John F. Woods <jfw%jfwhome.funhouse.com@localhost>
.\"
-.\" $NetBSD: tar.1,v 1.17 2000/01/17 12:44:39 wiz Exp $
+.\" $NetBSD: tar.1,v 1.18 2000/07/05 11:57:57 ad Exp $
.\"
.Dd 6 August 1994
.Os
@@ -280,6 +280,11 @@
.It Fl -exclude-from Ar file
Exclude files listed in
.Ar file .
+.It Fl y
+.It Fl -bzip2
+.It Fl -unbzip2
+Filter the archive through
+.Xr bzip2 1 .
.It Fl Z
.It Fl -compress
.It Fl -uncompress
@@ -398,6 +403,7 @@
.\" (command return values (to shell) and fprintf/stderr type diagnostics)
.\" .Sh DIAGNOSTICS
.Sh SEE ALSO
+.Xr bzip2 1 ,
.Xr compress 1 ,
.Xr gzip 1 ,
.Xr pax 1 ,
diff -r 32bee5b30040 -r 9171f728b1b0 gnu/usr.bin/tar/tar.c
--- a/gnu/usr.bin/tar/tar.c Wed Jul 05 11:46:40 2000 +0000
+++ b/gnu/usr.bin/tar/tar.c Wed Jul 05 11:57:57 2000 +0000
@@ -18,7 +18,7 @@
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef lint
-static char rcsid[] = "$NetBSD: tar.c,v 1.12 2000/06/26 08:25:34 kleink Exp $";
+static char rcsid[] = "$NetBSD: tar.c,v 1.13 2000/07/05 11:57:57 ad Exp $";
#endif /* not lint */
/*
@@ -170,6 +170,8 @@
{"compress", 0, 0, 'Z'},
{"uncompress", 0, 0, 'Z'},
{"block-compress", 0, &f_compress_block, 1},
+ {"bzip2", 0, 0, 'y'},
+ {"unbzip2", 0, 0, 'y'},
{"gzip", 0, 0, 'z'},
{"ungzip", 0, 0, 'z'},
{"use-compress-program", 1, 0, 18},
@@ -314,7 +316,7 @@
/* Parse options */
while ((c = getoldopt (argc, argv,
- "-01234567Ab:BcC:df:F:g:GhikK:lL:mMN:oOpPrRsStT:uvV:wWxX:zZ",
+ "-01234567Ab:BcC:df:F:g:GhikK:lL:mMN:oOpPrRsStT:uvV:wWxX:yzZ",
long_options, &ind)) != EOF)
{
switch (c)
@@ -629,6 +631,15 @@
add_exclude_file (optarg);
break;
+ case 'y':
+ if (f_compressprog)
+ {
+ msg ("Only one compression option permitted\n");
+ exit (EX_ARGSBAD);
+ }
+ f_compressprog = "bzip2";
+ break;
+
case 'z':
if (f_compressprog)
{
@@ -671,7 +682,7 @@
if (f_compress_block && !f_compressprog)
{
msg ("You must use a compression option (--gzip, --compress\n\
-or --use-compress-program) with --block-compress.\n");
+--bzip2 or --use-compress-program) with --block-compress.\n");
exit (EX_ARGSBAD);
}
}
@@ -761,6 +772,8 @@
-W, --verify attempt to verify the archive after writing it\n\
--exclude FILE exclude file FILE\n\
-X, --exclude-from FILE exclude files listed in FILE\n\
+-y, --bzip2,\n\
+ --unbzip2 filter the archive through bzip2\n\
-Z, --compress,\n\
--uncompress filter the archive through compress\n\
-z, --gzip,\n\
Home |
Main Index |
Thread Index |
Old Index