ablfs-more
legacy
trunk
Last change
on this file since dd9ca56 was fd4a798, checked in by Pierre Labastie <pierre.labastie@…>, 3 years ago |
Remove $Id$ comments, they are useless with git
|
-
Property mode
set to
100755
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 |
|
---|
3 | # Acknowledgment:
|
---|
4 | # The following code is a modified version of an original work written by
|
---|
5 | # Greg Schafer for the "DIY Linux" project and is included here with his
|
---|
6 | # permission.
|
---|
7 | # ref: http://www.diy-linux.org
|
---|
8 | #
|
---|
9 |
|
---|
10 | set -e
|
---|
11 |
|
---|
12 | : <<inline_doc
|
---|
13 | desc: creates the ICA report
|
---|
14 | usage: do_ica_work $PREV $ITERATION $ICALOGDIR $DEST_ICA
|
---|
15 | input vars: $1 previous iteration
|
---|
16 | $2 current iteration
|
---|
17 | $3 ICA log dir
|
---|
18 | $4 directory where ICA iterations are stored
|
---|
19 | externals: --
|
---|
20 | modifies: --
|
---|
21 | returns: --
|
---|
22 | on error:
|
---|
23 | on success:
|
---|
24 | inline_doc
|
---|
25 |
|
---|
26 | RAWDIFF=/tmp/rawdiff.$$
|
---|
27 | REPORT="${3}/REPORT.${1}V${2}"
|
---|
28 |
|
---|
29 | echo -en "\nGenerating ICA analysis report $1 versus $2 ..."
|
---|
30 |
|
---|
31 | mkdir -p $3
|
---|
32 |
|
---|
33 | cd $4
|
---|
34 |
|
---|
35 | echo -e "Diffing ${1} and ${2}... " > $REPORT
|
---|
36 | diff -ur ${1} ${2} > $RAWDIFF || :
|
---|
37 |
|
---|
38 | echo -e "The list of binary files that differ:\n" > $REPORT
|
---|
39 | grep "iles.*differ$" $RAWDIFF >> $REPORT
|
---|
40 |
|
---|
41 | echo -e "The list of files that exist \"only in\" 1 of the directories:\n" >> $REPORT
|
---|
42 |
|
---|
43 | if grep "^Only in" $RAWDIFF >/dev/null 2>&1; then
|
---|
44 | grep "^Only in" $RAWDIFF >> $REPORT
|
---|
45 | else
|
---|
46 | echo NONE >> $REPORT
|
---|
47 | fi
|
---|
48 |
|
---|
49 | grep -v "iles.*differ$" $RAWDIFF | \
|
---|
50 | grep -v "^Only in" > ${3}/${1}V${2}.ASCII.DIFF
|
---|
51 |
|
---|
52 | rm -f $RAWDIFF
|
---|
53 |
|
---|
54 | echo "done."
|
---|
Note:
See
TracBrowser
for help on using the repository browser.