From 9e590abfba275a8a06f890fd482b24380597f7e8 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Mon, 1 Nov 2021 17:39:49 +0100
Subject: [PATCH] update output message on file change

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

diff --git a/bin/create_config.sh b/bin/create_config.sh
index 53f092e..723c3e1 100755
--- a/bin/create_config.sh
+++ b/bin/create_config.sh
@@ -127,7 +127,8 @@ if [ $? -eq 0 ]; then
     exit 3
 fi
 
-# --- create target file
+echo
+echo --- Output file:
 bHasChanges=0
 if [ ! -f "${outfile}" ]; then
     echo "File did not exist before: ${outfile} - creating it as a new file.">> ${cfgdiff} 
@@ -136,14 +137,13 @@ fi
 
 diff "${tmpfile}" "${outfile}" >> ${cfgdiff} 2>/dev/null || bHasChanges=1
 if [ $bHasChanges -eq 0 ]; then
-    _warn "INFO: no changes."
+    _warn "INFO: no changes in ${outfile}."
 else
     echo "INFO: writing ${outfile} ..."
     mv -f "${tmpfile}" "${outfile}" || exit 4
 fi
 
-echo
-echo --- Output file:
+
 ls -l  "${outfile}" 
 if [ $? -ne 0 ]; then
     _err "ERROR: unable to write target file $outfile."
-- 
GitLab