This mode is designed for testing the behavior of paxutils
commands when some of the files change during archiving. It is an
experimental mode.
The ‘Exec Mode’ is toggled by --run command line option (or its alias -r). The non-optional arguments to getopt give the command line to be executed. Normally, it should contain at least the --checkpoint option.
A set of options is provided for defining checkpoint values and actions to be executed upon reaching them. Checkpoint values are introduced with the --checkpoint command line option. Argument to this option is the number of checkpoint in decimal.
Any number of actions may be specified after a checkpoint. Available actions are
Option --verbose instructs genfile to print on standard output notifications about checkpoints being executed and to verbosely describe exit status of the command.
While the command is being executed its standard output remains connected to descriptor 1. All messages it prints to file descriptor 2, except checkpoint notifications, are forwarded to standard error.
Genfile exits with the exit status of the executed command.
For compatibility with previous genfile versions, the --run option takes an optional argument. If used this way, its argument supplies the command line to be executed. There should be no non-optional arguments in the genfile command line.
The actual command line is constructed by inserting the --checkpoint option between the command name and its first argument (if any). Due to this, the argument to --run may not use traditional tar option syntax, i.e., the following is wrong:
# Wrong! genfile --run='tar cf foo bar'
Use the following syntax instead:
genfile --run='tar -cf foo bar' actions...
The above command line is equivalent to
genfile actions... -- tar -cf foo bar
Notice, that the use of compatibility mode is deprecated.