5 # The following code is a modified version of an original work written by
6 # Greg Schafer for the "DIY Linux" project and is included here with his
8 # ref: http://www.diy-linux.org
14 desc: creates the ICA report
15 usage: do_ica_work $PREV $ITERATION $ICALOGDIR $DEST_ICA
16 input vars: $1 previous iteration
19 $4 directory where ICA iterations are stored
27 RAWDIFF
=/tmp
/rawdiff.$$
28 REPORT
="${3}/REPORT.${1}V${2}"
30 echo -en "\nGenerating ICA analysis report $1 versus $2 ..."
36 echo -e "Diffing ${1} and ${2}... " > $REPORT
37 diff -ur ${1} ${2} > $RAWDIFF ||
:
39 echo -e "The list of binary files that differ:\n" > $REPORT
40 grep "iles.*differ$" $RAWDIFF >> $REPORT
42 echo -e "The list of files that exist \"only in\" 1 of the directories:\n" >> $REPORT
44 if grep "^Only in" $RAWDIFF >/dev
/null
2>&1; then
45 grep "^Only in" $RAWDIFF >> $REPORT
50 grep -v "iles.*differ$" $RAWDIFF | \
51 grep -v "^Only in" > ${3}/${1}V${2}.ASCII.DIFF