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
Branches
No related tags found
No related merge requests found
...@@ -131,11 +131,12 @@ echo ...@@ -131,11 +131,12 @@ echo
echo --- Output file: echo --- Output file:
bHasChanges=0 bHasChanges=0
if [ ! -f "${outfile}" ]; then 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 bHasChanges=1
fi 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 if [ $bHasChanges -eq 0 ]; then
_warn "INFO: no changes in ${outfile}." _warn "INFO: no changes in ${outfile}."
else else
......
...@@ -249,6 +249,7 @@ function deploy(){ ...@@ -249,6 +249,7 @@ function deploy(){
test $isupdate -eq 0 || run_task "${profiledir}/tasks_postinstall.sh" test $isupdate -eq 0 || run_task "${profiledir}/tasks_postinstall.sh"
grep . $cfgdiff grep . $cfgdiff
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "INFO: a config file was created or changed."
run_task "${profiledir}/tasks_postchange.sh" run_task "${profiledir}/tasks_postchange.sh"
else else
echo SKIP: No config file was changed. 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