Commit Graph

6 Commits

Author SHA1 Message Date
David A. Wheeler 982e703f2a entrypoint.sh: Small improvements
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>
2021-06-29 18:36:35 -04:00
David A. Wheeler 09b128946c entrypoint.sh: Modify to use "$@"
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>
2021-06-27 16:43:54 -04:00
David A. Wheeler 18b559b69d entrypoint.sh: Don't require output filename to be escaped
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>
2021-06-27 16:32:16 -04:00
Yong Yan fc471e1c63 update actions files and readme. 2021-06-24 11:56:59 -07:00
Yong Yan ce83692cd3 Grant shell script exeuction permission 2021-06-22 19:17:59 -07:00
Yong Yan ad8c4aadf3 Add Github Action required files and test workflow. 2021-06-22 19:17:03 -07:00