From 92c269834ebaa935b58365a528c6f799bfe4cbb0 Mon Sep 17 00:00:00 2001
From: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Date: Wed, 9 Sep 2020 19:38:23 +0200
Subject: [PATCH] add break

---
 run.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/run.sh b/run.sh
index 1b2e51ba..f1769468 100755
--- a/run.sh
+++ b/run.sh
@@ -2,6 +2,12 @@
 
 cd /usr/src/app
 
+if [ -z "${TO_MAIL}" ]
+then
+echo "TO_MAIL not set."
+exit 1
+fi
+
 function preview {
 
         (>&2 echo "run twitter")
@@ -20,8 +26,8 @@ function preview {
     }
 
 
-#if [ ! -z "$OUTPUT" ]
-#then
+if [ ! -z "$OUTPUT" ]
+then
 (cat << EOF
 Subject: Programm-Info-Bot
 Content-Type: text/plain; charset=UTF-8
@@ -30,4 +36,4 @@ $(preview)"
 EOF
 ) |  msmtp ${MSMTP_ARGUMENTS} ${TO_MAIL}
 
-#fi
+fi
-- 
GitLab