RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Anders F. Björklund
Root: /v/rpm/cvs Email: afb@rpm5.org
Module: xar Date: 20-Sep-2007 12:25:46
Branch: HEAD Handle: 2007092011254500
Modified files:
xar/src xar.1 xar.c
Log:
add -j/-z for bzip2/gzip (leimy2k)
Summary:
Revision Changes Path
1.3 +6 -0 xar/src/xar.1
1.6 +9 -1 xar/src/xar.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: xar/src/xar.1
============================================================================
$ cvs diff -u -r1.2 -r1.3 xar.1
--- xar/src/xar.1 30 Aug 2007 18:35:45 -0000 1.2
+++ xar/src/xar.1 20 Sep 2007 10:25:45 -0000 1.3
@@ -36,6 +36,12 @@
Specifies the compression type to use.
Valid values: none, gzip, bzip2. Default value: gzip
.TP
+\-j
+Synonym for \-\-compression=bzip2
+.TP
+\-z
+Synonym for \-\-compression=gzip
+.TP
\-\-dump\-toc=<filename>
Has xar dump the xml header into the specified file. "-" can be specified to mean stdout.
.TP
@@ .
patch -p0 <<'@@ .'
Index: xar/src/xar.c
============================================================================
$ cvs diff -u -r1.5 -r1.6 xar.c
--- xar/src/xar.c 15 Sep 2007 07:17:44 -0000 1.5
+++ xar/src/xar.c 20 Sep 2007 10:25:45 -0000 1.6
@@ -691,6 +691,8 @@
fprintf(stderr, "\t--compression Specifies the compression type to use.\n");
fprintf(stderr, "\t Valid values: none, gzip, bzip2\n");
fprintf(stderr, "\t Default: gzip\n");
+ fprintf(stderr, "\t-j Synonym for \"--compression=bzip2\"\n");
+ fprintf(stderr, "\t-z Synonym for \"--compression=gzip\"\n");
fprintf(stderr, "\t--list-subdocs List the subdocuments in the xml header\n");
fprintf(stderr, "\t--extract-subdoc=name Extracts the specified subdocument\n");
fprintf(stderr, "\t to a document in cwd named <name>.xml\n");
@@ -753,7 +755,7 @@
exit(1);
}
- while( (c = getopt_long(argc, argv, "xcvtf:hpPln:s:d:v", o, &loptind)) != -1 ) {
+ while( (c = getopt_long(argc, argv, "xcvtjzf:hpPln:s:d:v", o, &loptind)) != -1 ) {
switch(c) {
case 1 : if( !optarg ) {
usage(argv[0]);
@@ -910,6 +912,12 @@
List = 1;
command = c;
break;
+ case 'j':
+ Compression = "bzip2";
+ break;
+ case 'z':
+ Compression = "gzip";
+ break;
case 'f':
required_dash_f = 1;
filename = optarg;
@@ .
Received on Thu Sep 20 12:25:46 2007