diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-09-29 11:28:06 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2023-11-24 14:08:23 +0000 |
commit | b4f3f1d9ff11b92982bb252d81d5c53dfcc99691 (patch) | |
tree | 1744dbee0625d33a42b8b9b496dbaaed96b4ef82 | |
parent | 07f4b4f7d57cf8e7cb0d4f11a1f1b4588b5e2a9f (diff) |
common: Provide pass/fail helpers
Sometimes we don't have a return code to check explicitly and we already
know the pass/fail condition.
Provide wrappers to the pass_fail() call to provide a clean way to
report.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rwxr-xr-x | common.sh | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -119,6 +119,14 @@ pass_fail() { return "$1" } +fail() { + pass_fail 1 "$@" +} + +pass() { + pass_fail 0 "$@" +} + completed() { echo "$VERSION" > "$last_build" } |