Skip to content
Snippets Groups Projects
Commit 9e590abf authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

update output message on file change

parent 12dbf48f
No related branches found
No related tags found
No related merge requests found
......@@ -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."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment