From 3587d9101ac379ea35535cdd96cb71c8069743b3 Mon Sep 17 00:00:00 2001 From: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Date: Tue, 24 Nov 2020 09:30:16 +0100 Subject: [PATCH] Don't send mail if no text was generated --- run.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/run.sh b/run.sh index 7bf1924f..e5bff8eb 100755 --- a/run.sh +++ b/run.sh @@ -24,6 +24,13 @@ function preview { echo "" } +PREVIEW_TEXT="$(preview)" + +if [ -z "${PREVIEW_TEXT}" ] +then + (>&2 echo "nothing to send") + exit 0 +fi (cat << EOF Subject: Programm-Info-Bot -- GitLab