We can't quote argument 1, as it is expected to contain
multiple whitespace-seprated parameters and we need to expand any
globs in it.
This adds the use of "tee", so that the output goes to both the
file specified in $2 and also to stdout (so the results are directly
visible in the CI/CD display).
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Modify entrypoint.sh, used by the Dockerfile.
The previous version of entrypoint.sh only used the first parameter.
What's worse, it would double-expand globs
(referring to "*.c", if a file was named *.c, that would get
expanded again). Usually variable references in shell are quoted.
In addition, the original version *ALWAYS* echoed a success,
even if the command did NOT succeed for some reason.
Instead of printing the spurious message, just show the output and
let the exit value get communicated back to the caller.
This is especially important for CI/CD, since we want the CI/CD
system to get the exit value (e.g., so it can report failure if there
was a failure).
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Note that the input filenames still have to be escaped
(to support the use of "-" options on the command line).
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>