summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-09-29 11:28:06 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2023-11-24 14:08:23 +0000
commitb4f3f1d9ff11b92982bb252d81d5c53dfcc99691 (patch)
tree1744dbee0625d33a42b8b9b496dbaaed96b4ef82
parent07f4b4f7d57cf8e7cb0d4f11a1f1b4588b5e2a9f (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-xcommon.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/common.sh b/common.sh
index 746db19..57a4aed 100755
--- a/common.sh
+++ b/common.sh
@@ -119,6 +119,14 @@ pass_fail() {
return "$1"
}
+fail() {
+ pass_fail 1 "$@"
+}
+
+pass() {
+ pass_fail 0 "$@"
+}
+
completed() {
echo "$VERSION" > "$last_build"
}