From 95770efca6ce61a6a397d17377d7b150ba2353e1 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Fri, 5 Nov 2021 10:42:07 +0100
Subject: [PATCH] do not abort on templates without replacement - show just a
 warning

---
 bin/create_config.sh | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/bin/create_config.sh b/bin/create_config.sh
index d5ef2a1..23cfc9d 100755
--- a/bin/create_config.sh
+++ b/bin/create_config.sh
@@ -121,10 +121,14 @@ echo
 echo --- Changes:
 diff "$tplfile" "$tmpfile"
 if [ $? -eq 0 ]; then
-    _err "ERROR: template was unchanged. Check placeholders in $tplfile and replacements:"
-    echo Content of relacement files:
-    cat $replacefile
-    exit 3
+    _warn "WARNING:"
+    _warn "The template was unchanged and will be written directly as output file without any changes."
+    _warn "Replacements in $tplfile: $(grep '<\%\=\ *\@replace\[' ${tplfile} | wc -l )"
+    grep '<\%\=\ *\@replace\[' ${tplfile}
+    echo
+    # echo Content of relacement files:
+    # cat $replacefile
+    # exit 3
 fi
 
 echo
-- 
GitLab