summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-07-16 12:26:32 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-07-16 12:26:32 +0100
commitd82e31622769571672e24b9620f47b1830aec592 (patch)
tree3f0b27744f385873879ed4f46c3a5ada4386d7ab
parentcdad41e97122ceb548f62b9664ed3fd2dba4ccb6 (diff)
common: Output errors on failures
If there's a logfile defined, when something fails, report the log file to the main execution. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rwxr-xr-xcommon.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/common.sh b/common.sh
index 3ef1745..7e21eb1 100755
--- a/common.sh
+++ b/common.sh
@@ -59,6 +59,9 @@ check_version() {
pass_fail() {
if [ "$1" -ne 0 ]; then
echo " $2: *** Failed ***"
+ if [ -e $logfile ]; then
+ cat $logfile;
+ fi
exit "$1"
else
echo " $2: Passed"