diff options
Diffstat (limited to 'gnu/usr.bin/tar/tar.c')
| -rw-r--r-- | gnu/usr.bin/tar/tar.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/gnu/usr.bin/tar/tar.c b/gnu/usr.bin/tar/tar.c index 7fb54f81f440..81add3fad956 100644 --- a/gnu/usr.bin/tar/tar.c +++ b/gnu/usr.bin/tar/tar.c @@ -171,9 +171,9 @@ struct option long_options[] = {"compress", 0, 0, 'Z'}, {"uncompress", 0, 0, 'Z'}, {"block-compress", 0, &f_compress_block, 1}, - {"bzip", 0, 0, 'y'}, - {"bzip2", 0, 0, 'y'}, - {"bunzip2", 0, 0, 'y'}, + {"bzip", 0, 0, 'j'}, + {"bzip2", 0, 0, 'j'}, + {"bunzip2", 0, 0, 'j'}, {"gzip", 0, 0, 'z'}, {"gunzip", 0, 0, 'z'}, {"ungzip", 0, 0, 'z'}, /* for backwards compatibility with former typo */ @@ -320,7 +320,7 @@ options (argc, argv) /* Parse options */ while ((c = getoldopt (argc, argv, - "-01234567Ab:BcC:df:F:g:GhiIkK:lL:mMnN:oOpPrRsStT:uvV:wWxX:yzZ", + "-01234567Ab:BcC:df:F:g:GhiIjkK:lL:mMnN:oOpPrRsStT:uvV:wWxX:yzZ", long_options, &ind)) != EOF) { switch (c) @@ -507,6 +507,17 @@ options (argc, argv) */ break; + case 'j': + case 'y': + if (f_compressprog) + { + msg ("Only one compression option permitted\n"); + exit (EX_ARGSBAD); + } + f_compressprog = "bzip2"; + break; + + case 'k': /* Don't overwrite files */ #ifdef NO_OPEN3 msg ("can't keep old files on this system"); @@ -602,6 +613,7 @@ options (argc, argv) break; case 'T': + case 'I': name_file = optarg; f_namefile++; break; @@ -641,16 +653,6 @@ options (argc, argv) add_exclude_file (optarg); break; - case 'I': - case 'y': - if (f_compressprog) - { - msg ("Only one compression option permitted\n"); - exit (EX_ARGSBAD); - } - f_compressprog = "bzip2"; - break; - case 'z': if (f_compressprog) { @@ -774,7 +776,7 @@ Other options:\n\ --same-owner create extracted files with the same ownership \n\ --show-omitted-dirs show omitted directories while processing the archive.\n\ -S, --sparse handle sparse files efficiently\n\ --T, --files-from F get names to extract or create from file F\n\ +-T, -I, --files-from F get names to extract or create from file F\n\ --null -T reads null-terminated names, disable -C\n\ --totals print total bytes written with --create\n\ -v, --verbose verbosely list files processed\n\ @@ -787,7 +789,7 @@ Other options:\n\ -W, --verify attempt to verify the archive after writing it\n\ --exclude PATTERN exclude files, given as a globbing PATTERN\n\ -X, --exclude-from FILE exclude files listed in FILE\n\ --y, --bzip2, --bunzip2 filter the archive through bzip2\n\ +-j, -y, --bzip, --bzip2, --bunzip2 filter the archive through bzip2\n\ -Z, --compress,\n\ --uncompress filter the archive through compress\n\ -z, --gzip,\n\ |
