src: add new option --link to preserve hard links; use with care

This commit is contained in:
Markus F.X.J. Oberhumer
2023-09-04 22:34:21 +02:00
parent 62dbf8485f
commit 4f6320d3aa
8 changed files with 181 additions and 82 deletions
+13 -1
View File
@@ -185,7 +185,6 @@ void show_help(int verbose) {
con_fprintf(f,
" -q be quiet -v be verbose\n"
" -oFILE write output to 'FILE'\n"
//" -f force overwrite of output files and compression of suspicious files\n"
" -f force compression of suspicious files\n"
"%s%s"
, (verbose == 0) ? " -k keep backup files\n" : ""
@@ -222,6 +221,19 @@ void show_help(int verbose) {
" --overlay=skip don't compress a file with an overlay\n"
"\n");
fg = con_fg(f, FG_YELLOW);
con_fprintf(f, "File system options:\n");
fg = con_fg(f, fg);
con_fprintf(f,
" --force-overwrite force overwrite of output files\n"
#if defined(__unix__) && !defined(__MSYS2__)
" --link preserve hard links (Unix only) [USE WITH CARE]\n"
" --no-link do not preserve hard links but rename files [default]\n"
#endif
" --no-mode do not preserve file mode (aka permissions)\n"
" --no-owner do not preserve file ownership\n"
" --no-time do not preserve file timestamp\n"
"\n");
fg = con_fg(f, FG_YELLOW);
con_fprintf(f, "Options for djgpp2/coff:\n");
fg = con_fg(f, fg);
con_fprintf(f,