Debian Codegraph @

lab/diffcheck

raw symbols SCIP
1 #! /bin/shscip-shell filesystem . . `/bin/sh`.
2
3 #================================================================
4 # diffcheck
5 # List files different from ones of another version
6 #================================================================
7
8
9 # set variables
10 progexts='\.in|\.h|\.c|\.cc|\.cpp|\.cxx|\.java|\.pl|\.pm|\.pod|\.rb|\.rd'
11 docexts='\.[1-9]|spex\.html|\spex-ja\.html|\.txt'
12 regex="($progexts|$docexts)\$"
13
14
15 # check arguments
16 if [scip-shell system . . `[`. $# != 1 ]
17 then
18 printfscip-shell system . . printf. 'diffcheck: usage: diffcheck directory_of_oldversion\n' 1>&2
19 exit 1
20 fi
21
22
23 # diff files
24 findscip-shell system . . find. . -type f | egrepscip-shell system . . egrep. $regex |
25 while read file
26 do
27 old=`printfscip-shell system . . printf. '%s\n' "$file" | sedscip-shell system . . sed. 's/^\.\///'`
28 printfscip-shell system . . printf. 'Checking %s and %s ... ' "$file" "$1/$old"
29 res=`diffscip-shell system . . diff. -q "$file" "$1/$old"`
30 if [scip-shell system . . `[`. -z "$res" ]
31 then
32 printfscip-shell system . . printf. 'same\n'
33 else
34 printfscip-shell system . . printf. '### !!! DIFFERENT !!! ###\n'
35 fi
36 done
37
38
39 # exit normally
40 exit 0
41
42
43
44 # END OF FILE