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-20 13:19:55 +0000 |
commit | 0cedb5faf43da6fb8da0b6792b2a044a9361c02a (patch) | |
tree | 8758c75d0af02b4a59341a36e5008e59c3e2764b /common.sh | |
parent | 0359b73306bebfd021546350575d7ec60ab16d26 (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>
Diffstat (limited to 'common.sh')
-rwxr-xr-x | common.sh | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -98,6 +98,14 @@ pass_fail() { return "$1" } +fail() { + pass_fail 1 "$@" +} + +pass() { + pass_fail 0 "$@" +} + completed() { echo "$VERSION" > "$last_build" } |