Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/pax add --use-compress-program to pax, requested by mrg.



details:   https://anonhg.NetBSD.org/src/rev/790726988616
branches:  trunk
changeset: 755755:790726988616
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jun 19 00:43:57 2010 +0000

description:
add --use-compress-program to pax, requested by mrg.

diffstat:

 bin/pax/options.c |  11 +++++++++--
 bin/pax/pax.1     |   7 +++++--
 2 files changed, 14 insertions(+), 4 deletions(-)

diffs (74 lines):

diff -r 731200e7daef -r 790726988616 bin/pax/options.c
--- a/bin/pax/options.c Fri Jun 18 21:10:23 2010 +0000
+++ b/bin/pax/options.c Sat Jun 19 00:43:57 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: options.c,v 1.106 2009/12/14 05:04:48 dholland Exp $   */
+/*     $NetBSD: options.c,v 1.107 2010/06/19 00:43:57 christos Exp $   */
 
 /*-
  * Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)options.c  8.2 (Berkeley) 4/18/94";
 #else
-__RCSID("$NetBSD: options.c,v 1.106 2009/12/14 05:04:48 dholland Exp $");
+__RCSID("$NetBSD: options.c,v 1.107 2010/06/19 00:43:57 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -240,6 +240,8 @@
                                                OPT_INSECURE },
        { "force-local",        no_argument,            0,
                                                OPT_FORCE_LOCAL },
+       { "use-compress-program", required_argument,    0,
+                                               OPT_USE_COMPRESS_PROGRAM },
        { 0,                    0,                      0,
                                                0 },
 };
@@ -474,6 +476,7 @@
                        /*
                         * use gzip.  Non standard option.
                         */
+                       zflag = 1;
                        gzip_program = GZIP_CMD;
                        break;
                case 'A':
@@ -642,6 +645,10 @@
                case OPT_FORCE_LOCAL:
                        forcelocal = 0;
                        break;
+               case OPT_USE_COMPRESS_PROGRAM:
+                       zflag = 1;
+                       gzip_program = optarg;
+                       break;
                case '?':
                default:
                        pax_usage();
diff -r 731200e7daef -r 790726988616 bin/pax/pax.1
--- a/bin/pax/pax.1     Fri Jun 18 21:10:23 2010 +0000
+++ b/bin/pax/pax.1     Sat Jun 19 00:43:57 2010 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: pax.1,v 1.57 2010/04/05 21:22:37 joerg Exp $
+.\"    $NetBSD: pax.1,v 1.58 2010/06/19 00:43:57 christos Exp $
 .\"
 .\" Copyright (c) 1992 Keith Muller.
 .\" Copyright (c) 1992, 1993
@@ -33,7 +33,7 @@
 .\"
 .\"    @(#)pax.1       8.4 (Berkeley) 4/18/94
 .\"
-.Dd September 6, 2009
+.Dd June 18, 2010
 .Dt PAX 1
 .Os
 .Sh NAME
@@ -1101,6 +1101,9 @@
 files that contain
 .Dq ..
 can be processed.
+.It Fl -use-compress-program
+Use the named program as the program to decompress the input or compress
+the output.
 .El
 .Pp
 The options that operate on the names of files or archive members



Home | Main Index | Thread Index | Old Index