summaryrefslogtreecommitdiffstats
path: root/main.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-04-13 08:59:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-04-13 08:59:14 +0000
commitbab86e3bc6fcc2b148d2a58247e27c765b2b1471 (patch)
treea21a640ddd20d20c6d01cfe1f13b5494722fcb1c /main.cc
parentReleasing debian version 0.14-1. (diff)
downloadtarlz-bab86e3bc6fcc2b148d2a58247e27c765b2b1471.tar.xz
tarlz-bab86e3bc6fcc2b148d2a58247e27c765b2b1471.zip
Merging upstream version 0.15.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'main.cc')
-rw-r--r--main.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/main.cc b/main.cc
index 8dcd2b2..d881b19 100644
--- a/main.cc
+++ b/main.cc
@@ -85,12 +85,13 @@ void show_help( const long num_online )
std::printf( "\nOptions:\n"
" --help display this help and exit\n"
" -V, --version output version information and exit\n"
- " -A, --concatenate append tar.lz archives to the end of an archive\n"
+ " -A, --concatenate append archives to the end of an archive\n"
" -B, --data-size=<bytes> set target size of input data blocks [2x8=16 MiB]\n"
" -c, --create create a new archive\n"
" -C, --directory=<dir> change to directory <dir>\n"
" -d, --diff find differences between archive and file system\n"
" --ignore-ids ignore differences in owner and group IDs\n"
+ " --delete delete files/directories from an archive\n"
" --exclude=<pattern> exclude files matching a shell pattern\n"
" -f, --file=<archive> use archive file <archive>\n"
" -h, --dereference follow symlinks; archive the files they point to\n"
@@ -99,7 +100,7 @@ void show_help( const long num_online )
" -r, --append append files to the end of an archive\n"
" -t, --list list the contents of an archive\n"
" -v, --verbose verbosely list files processed\n"
- " -x, --extract extract files from an archive\n"
+ " -x, --extract extract files/directories from an archive\n"
" -0 .. -9 set compression level [default 6]\n"
" --uncompressed don't compress the archive created\n"
" --asolid create solidly compressed appendable archive\n"
@@ -310,9 +311,9 @@ int main( const int argc, const char * const argv[] )
{ show_error( "Bad library version. At least lzlib 1.0 is required." );
return 1; }
- enum { opt_ano = 256, opt_aso, opt_bso, opt_crc, opt_dbg, opt_dso, opt_exc,
- opt_grp, opt_hlp, opt_id, opt_kd, opt_nso, opt_out, opt_own, opt_per,
- opt_sol, opt_un };
+ enum { opt_ano = 256, opt_aso, opt_bso, opt_crc, opt_dbg, opt_del, opt_dso,
+ opt_exc, opt_grp, opt_hlp, opt_id, opt_kd, opt_nso, opt_out, opt_own,
+ opt_per, opt_sol, opt_un };
const Arg_parser::Option options[] =
{
{ '0', 0, Arg_parser::no },
@@ -344,6 +345,7 @@ int main( const int argc, const char * const argv[] )
{ opt_aso, "asolid", Arg_parser::no },
{ opt_bso, "bsolid", Arg_parser::no },
{ opt_dbg, "debug", Arg_parser::yes },
+ { opt_del, "delete", Arg_parser::no },
{ opt_dso, "dsolid", Arg_parser::no },
{ opt_exc, "exclude", Arg_parser::yes },
{ opt_grp, "group", Arg_parser::yes },
@@ -402,6 +404,7 @@ int main( const int argc, const char * const argv[] )
case opt_bso: solidity = bsolid; break;
case opt_crc: missing_crc = true; break;
case opt_dbg: debug_level = getnum( arg, 0, 3 ); break;
+ case opt_del: set_mode( program_mode, m_delete ); break;
case opt_dso: solidity = dsolid; break;
case opt_exc: Exclude::add_pattern( sarg ); break;
case opt_grp: set_group( arg ); break;
@@ -433,6 +436,8 @@ int main( const int argc, const char * const argv[] )
num_workers, out_slots, debug_level,
program_mode == m_append, dereference );
case m_concatenate: return concatenate( archive_name, parser, filenames );
+ case m_delete: return delete_members( archive_name, parser, filenames,
+ missing_crc, permissive );
case m_diff:
case m_extract:
case m_list: return decode( archive_name, parser, filenames,