Supply a dry-run option for bash, something akin to a combination of the -x and -n options. When a script is processed by bash in dry-run mode there is output to stdout the sequence of commands that bash determines to run, something like -x, but the commands are not in fact executed, as with -n
If the output were to be captured as a script, that script itself could be run by a normal invocation of bash, giving the same result, output and side-effects, as the original script would give. If the
captured script were executed in dry-run mode the output should be the same as the input.
A typical use is to determine what a complicated script, like libtool, will end up doing in the particular situation where it is used.
There is a scheme to determine which commands are dry-run (not all should be) and what to do when the behaviour of the script would depend on the output of commands that were never run.
Code so far posted is quite immature.
Downloads:
0 This Week