diff -pru tar-1.13-save-dir-metadata/src/tar.c tar-1.13-bz2/src/tar.c --- tar-1.13-save-dir-metadata/src/tar.c 2008-09-30 19:13:47.000000000 +0200 +++ tar-1.13-bz2/src/tar.c 2008-09-30 19:35:45.000000000 +0200 @@ -16,6 +16,8 @@ with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* Patched to integrate bzip2 as compression filter (options -j, --bzip2 and --bunzip2) */ + #include "system.h" #include @@ -164,6 +166,8 @@ struct option long_options[] = {"block-number", no_argument, NULL, 'R'}, {"block-size", required_argument, NULL, OBSOLETE_BLOCKING_FACTOR}, {"blocking-factor", required_argument, NULL, 'b'}, + {"bzip2", required_argument, NULL, 'j'}, + {"bunzip2", required_argument, NULL, 'j'}, {"catenate", no_argument, NULL, 'A'}, {"checkpoint", no_argument, &checkpoint_option, 1}, {"compare", no_argument, NULL, 'd'}, @@ -342,6 +346,7 @@ Archive format selection:\n\ PATTERN at list/extract time, a globbing PATTERN\n\ -o, --old-archive, --portability write a V7 format archive\n\ --posix write a POSIX conformant archive\n\ + -j, --bzip2, --bunzip2 filter the archive through bzip2\n\ -z, --gzip, --ungzip filter the archive through gzip\n\ -Z, --compress, --uncompress filter the archive through compress\n\ --use-compress-program=PROG filter through PROG (must accept -d)\n"), @@ -418,7 +423,7 @@ Report bugs to .\n"), Y per-block gzip compression */ #define OPTION_STRING \ - "-01234567ABC:F:GK:L:MN:OPRST:UV:WX:Zb:cdf:g:hiklmoprstuvwxz" + "-01234567ABC:F:GK:L:MN:OPRST:UV:WX:Zb:cdf:g:hijklmoprstuvwxz" static void set_subcommand_option (enum subcommand subcommand) @@ -790,6 +795,10 @@ decode_options (int argc, char *const *a FATAL_ERROR ((0, errno, "%s", optarg)); break; + case 'j': + set_use_compress_program_option ("bzip2"); + break; + case 'z': set_use_compress_program_option ("gzip"); break; Only in tar-1.13-bz2/src: tar.c~