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

finetune output on changed config file

parent 373f7449
No related branches found
No related tags found
No related merge requests found
......@@ -131,11 +131,12 @@ echo
echo --- Output file:
bHasChanges=0
if [ ! -f "${outfile}" ]; then
echo "File did not exist before: ${outfile} - creating it as a new file.">> ${cfgdiff}
echo "${outfile} File did not exist before - creating it as a new file.">> ${cfgdiff}
bHasChanges=1
fi
diff "${tmpfile}" "${outfile}" >> ${cfgdiff} 2>/dev/null || bHasChanges=1
diff "${tmpfile}" "${outfile}" >/dev/null 2>/dev/null || bHasChanges=1
diff "${tmpfile}" "${outfile}" | sed "s#^#${outfile} #g" >> ${cfgdiff} 2>/dev/null
if [ $bHasChanges -eq 0 ]; then
_warn "INFO: no changes in ${outfile}."
else
......
......@@ -249,6 +249,7 @@ function deploy(){
test $isupdate -eq 0 || run_task "${profiledir}/tasks_postinstall.sh"
grep . $cfgdiff
if [ $? -eq 0 ]; then
echo "INFO: a config file was created or changed."
run_task "${profiledir}/tasks_postchange.sh"
else
echo SKIP: No config file was changed.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment