source: extras/do_ica_work@ f6420b0

ablfs-more trunk
Last change on this file since f6420b0 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
10set -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:
24inline_doc
25
26RAWDIFF=/tmp/rawdiff.$$
27REPORT="${3}/REPORT.${1}V${2}"
28
29echo -en "\nGenerating ICA analysis report $1 versus $2 ..."
30
31mkdir -p $3
32
33cd $4
34
35echo -e "Diffing ${1} and ${2}... " > $REPORT
36diff -ur ${1} ${2} > $RAWDIFF || :
37
38echo -e "The list of binary files that differ:\n" > $REPORT
39grep "iles.*differ$" $RAWDIFF >> $REPORT
40
41echo -e "The list of files that exist \"only in\" 1 of the directories:\n" >> $REPORT
42
43if grep "^Only in" $RAWDIFF >/dev/null 2>&1; then
44 grep "^Only in" $RAWDIFF >> $REPORT
45else
46 echo NONE >> $REPORT
47fi
48
49grep -v "iles.*differ$" $RAWDIFF | \
50grep -v "^Only in" > ${3}/${1}V${2}.ASCII.DIFF
51
52rm -f $RAWDIFF
53
54echo "done."
Note: See TracBrowser for help on using the repository browser.