git @ Cat's Eye Technologies The-Dipple / c63b7ce
Add a script that recursively diffs, and can be continued. Chris Pressey 1 year, 5 months ago
1 changed file(s) with 32 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 #!/bin/sh
1
2 # Recurse through all the files in the current directory and compare
3 # them to their counterparts in the given directory.
4 #
5 # Different from `diff --brief --recursive` because:
6 # 1) will verbosely report every filename as it compares it
7 # 2) allows to continue a long recursion by skip until a given filename
8
9 TARGET=$1
10
11 ACTIVE=Y
12
13 # ACTIVE=N
14 # SKIPUNTIL="./test.sh"
15
16 for F in `find`
17 do
18 if [ "$F" = "$SKIPUNTIL" ]; then
19 ACTIVE=Y
20 fi
21 if [ ! -d $F ]; then
22 if [ $ACTIVE != "Y" ]; then
23 echo -n ""
24 # echo "(skipping $F)"
25 elif diff --brief --new-file $F $TARGET$F; then
26 echo $F
27 else
28 echo "!!! $F"
29 fi
30 fi
31 done