experimental
Last change
on this file since addb529 was 9b5d069, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago |
Fixed where the *.ASCII.DIFF files are stored.
|
-
Property mode
set to
100755
|
File size:
1.2 KB
|
Rev | Line | |
---|
[ed0a142] | 1 | #!/bin/bash
|
---|
| 2 | # $Id$
|
---|
[6753ff7] | 3 |
|
---|
| 4 | # Acknowledgment:
|
---|
| 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
|
---|
| 7 | # permission.
|
---|
| 8 | # ref: http://www.diy-linux.org
|
---|
| 9 | #
|
---|
| 10 |
|
---|
[ed0a142] | 11 | set -e
|
---|
| 12 |
|
---|
[eddf89f5] | 13 | : <<inline_doc
|
---|
| 14 | desc: creates the ICA report
|
---|
| 15 | usage: do_ica_work $PREV $ITERATION $ICALOGDIR $DEST_ICA
|
---|
| 16 | input vars: $1 previous iteration
|
---|
| 17 | $2 current iteration
|
---|
| 18 | $3 ICA log dir
|
---|
| 19 | $4 directory where ICA iterations are stored
|
---|
| 20 | externals: --
|
---|
| 21 | modifies: --
|
---|
| 22 | returns: --
|
---|
| 23 | on error:
|
---|
| 24 | on success:
|
---|
| 25 | inline_doc
|
---|
| 26 |
|
---|
[7fa1d20] | 27 | RAWDIFF=/tmp/rawdiff.$$
|
---|
| 28 | REPORT="${3}/REPORT.${1}V${2}"
|
---|
[6753ff7] | 29 |
|
---|
[34cabf6] | 30 | echo -en "\nGenerating ICA analysis report $1 versus $2 ..."
|
---|
| 31 |
|
---|
[a212c80] | 32 | mkdir -p $3
|
---|
| 33 |
|
---|
[6753ff7] | 34 | cd $4
|
---|
| 35 |
|
---|
| 36 | echo -e "Diffing ${1} and ${2}... " > $REPORT
|
---|
| 37 | diff -ur ${1} ${2} > $RAWDIFF || :
|
---|
| 38 |
|
---|
| 39 | echo -e "The list of binary files that differ:\n" > $REPORT
|
---|
| 40 | grep "iles.*differ$" $RAWDIFF >> $REPORT
|
---|
| 41 |
|
---|
| 42 | echo -e "The list of files that exist \"only in\" 1 of the directories:\n" >> $REPORT
|
---|
| 43 |
|
---|
| 44 | if grep "^Only in" $RAWDIFF >/dev/null 2>&1; then
|
---|
| 45 | grep "^Only in" $RAWDIFF >> $REPORT
|
---|
| 46 | else
|
---|
| 47 | echo NONE >> $REPORT
|
---|
| 48 | fi
|
---|
[ed0a142] | 49 |
|
---|
[6753ff7] | 50 | grep -v "iles.*differ$" $RAWDIFF | \
|
---|
[9b5d069] | 51 | grep -v "^Only in" > ${3}/${1}V${2}.ASCII.DIFF
|
---|
[ed0a142] | 52 |
|
---|
[6753ff7] | 53 | rm -f $RAWDIFF
|
---|
[34cabf6] | 54 |
|
---|
| 55 | echo "done."
|
---|
Note:
See
TracBrowser
for help on using the repository browser.