|
|
88751e |
#include "tpax_driver_impl.h"
|
|
|
538329 |
#include "tpax_visibility_impl.h"
|
|
|
88751e |
#include "argv/argv.h"
|
|
|
88751e |
|
|
|
538329 |
const tpax_hidden struct argv_option tpax_default_options[] = {
|
|
|
e4338c |
{"Wversion", 0,TAG_VERSION,ARGV_OPTARG_NONE,
|
|
|
e4338c |
ARGV_OPTION_HYBRID_ONLY,0,0,
|
|
|
88751e |
"show version information"},
|
|
|
88751e |
|
|
|
e4338c |
{"Whelp", 0,TAG_HELP,ARGV_OPTARG_NONE,
|
|
|
e4338c |
ARGV_OPTION_HYBRID_ONLY,0,0,
|
|
|
e4338c |
"show usage information"},
|
|
|
88751e |
|
|
|
e4338c |
{"Wlist", 0,TAG_LIST,ARGV_OPTARG_NONE,
|
|
|
e4338c |
ARGV_OPTION_HYBRID_ONLY,0,0,
|
|
|
fb301b |
"list mode (output names of archive members)"},
|
|
|
893ea2 |
|
|
|
e4338c |
{"Wread", 'r',TAG_READ,ARGV_OPTARG_NONE,
|
|
|
e4338c |
ARGV_OPTION_HYBRID_ONLY,0,0,
|
|
|
fb301b |
"read mode (extract matching archive members)"},
|
|
|
893ea2 |
|
|
|
e4338c |
{"Write", 'w',TAG_WRITE,ARGV_OPTARG_NONE,
|
|
|
e4338c |
ARGV_OPTION_HYBRID_ONLY,0,0,
|
|
|
fb301b |
"write mode (add specified files to archive)"},
|
|
|
893ea2 |
|
|
|
e4338c |
{"Wcopy", 0,TAG_COPY,ARGV_OPTARG_NONE,
|
|
|
e4338c |
ARGV_OPTION_HYBRID_ONLY,0,0,
|
|
|
893ea2 |
"copy mode (copy specified files "
|
|
|
893ea2 |
"to a specified destination directory)"},
|
|
|
893ea2 |
|
|
|
8aa3fc |
|
|
|
e4338c |
{"Wformat", 'x',TAG_FORMAT,ARGV_OPTARG_REQUIRED,
|
|
|
e4338c |
ARGV_OPTION_HYBRID_ONLY|ARGV_OPTION_HYBRID_EQUAL,
|
|
|
8aa3fc |
"pax|cpio|ustar|rustar",0,
|
|
|
8aa3fc |
"archive format [%s]"},
|
|
|
8aa3fc |
|
|
|
e4338c |
{"Wblksize", 'b',TAG_BLKSIZE,ARGV_OPTARG_REQUIRED,
|
|
|
e4338c |
ARGV_OPTION_HYBRID_ONLY|ARGV_OPTION_HYBRID_EQUAL,0,0,
|
|
|
54c29f |
"(non-default) block-size; valid values are "
|
|
|
54c29f |
"in the range of 512 to 32256; keeping "
|
|
|
54c29f |
"the default format-specific block size "
|
|
|
54c29f |
"(5120 for the pax and cpio formats,"
|
|
|
54c29f |
" 10240 for the ustar format) "
|
|
|
54c29f |
"is strongly recommended."},
|
|
|
54c29f |
|
|
|
e4338c |
{"Wrecurse", 0,TAG_RECURSE,ARGV_OPTARG_NONE,
|
|
|
e4338c |
ARGV_OPTION_HYBRID_ONLY,0,0,
|
|
|
23fa88 |
"recurse into directory archive members "
|
|
|
23fa88 |
"(this is the tpax_main() default)"},
|
|
|
23fa88 |
|
|
|
e4338c |
{"Wno-recurse",'d',TAG_NORECURSE,ARGV_OPTARG_NONE,
|
|
|
e4338c |
ARGV_OPTION_HYBRID_ONLY,0,0,
|
|
|
23fa88 |
"do not recurse into directory archive members"},
|
|
|
23fa88 |
|
|
|
e4338c |
{"Wstrict-path-input",
|
|
|
e4338c |
0,TAG_STRICT_PATH,ARGV_OPTARG_NONE,
|
|
|
e4338c |
ARGV_OPTION_HYBRID_ONLY,0,0,
|
|
|
efbaf8 |
"do not allow file arguments (in write and copy modes) "
|
|
|
efbaf8 |
"to contain parent-directoy (dot dot) references"},
|
|
|
efbaf8 |
|
|
|
e4338c |
{"Wpure-path-output",
|
|
|
e4338c |
0,TAG_PURE_PATH,ARGV_OPTARG_NONE,
|
|
|
e4338c |
ARGV_OPTION_HYBRID_ONLY,0,0,
|
|
|
efbaf8 |
"output (in list mode) or store (in write mode) path "
|
|
|
efbaf8 |
"names in pure form, specifically by liminating all "
|
|
|
efbaf8 |
"this-dir (dot) elements from the listed/stored path "
|
|
|
efbaf8 |
"name, as well as replacing each meaningless sequence "
|
|
|
efbaf8 |
"of consecutive forward slash characters with a single "
|
|
|
efbaf8 |
"forward slash; the presence of exactly two forward "
|
|
|
efbaf8 |
"slash characters in the beginning of a path may be "
|
|
|
efbaf8 |
"meaningful, and therefore shall remain instact."},
|
|
|
efbaf8 |
|
|
|
88751e |
{0,0,0,0,0,0,0,0}
|
|
|
88751e |
};
|