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

save config diffs

parent 8f76bdeb
Branches
No related tags found
No related merge requests found
......@@ -128,8 +128,14 @@ if [ $? -eq 0 ]; then
fi
# --- create target file
diff "${tmpfile}" "${outfile}" >> ${cfgdiff} 2>/dev/null
if [ $? -eq 0 -a -f "${outfile}" ]; then
bHasChanges=0
if [ ! -f "${outfile}" ]; then
echo "File did not exist before: ${outfile} - creating it as a new file.">> ${cfgdiff}
bHasChanges=1
fi
diff "${tmpfile}" "${outfile}" >> ${cfgdiff} 2>/dev/null || bHasChanges=1
if [ $bHasChanges -eq 0 ]; then
_warn "INFO: no changes."
else
mv -f "${tmpfile}" "${outfile}" || exit 4
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment