-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcode-diff
More file actions
executable file
·42 lines (33 loc) · 908 Bytes
/
code-diff
File metadata and controls
executable file
·42 lines (33 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/bash
## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
# Compare code here with code in Jena.
if [ $# != 1 ]
then
echo "Usage: $0 basename" 1>&2
exit 1
fi
FN="$1"
## echo "==== IRI"
DIR1=$HOME/ASF/jena/jena-iri3986/src/main/java/org/apache/jena/rfc3986
DIR2=$HOME/ASF/x4ld/iri4ld/src/main/java/org/seaborne/rfc3986
## echo "==== Langtag"
## DIR1=$HOME/ASF/jena/jena-langtag/src/main/java/org/apache/jena/langtag
## DIR2=$HOME/ASF/x4ld/lang4ld/src/main/java/org/seaborne/lang4ld
FN1="$DIR1/$FN"
FN2="$DIR2/$FN"
if [ ! -e "$FN1" ]
then
echo "No such file: $FN1" 1>&2
exit 1
fi
if [ ! -e "$FN2" ]
then
echo "No such file: $FN2" 1>&2
exit 1
fi
cat $FN1 | grep -E -v '^(import|package)' > FILE1
cat $FN2 | grep -E -v '^(import|package)' > FILE2
echo "== Diff of $FN (jena<, iri4ld>)"
##diff "$FN1" "$FN2"
diff "FILE1" "FILE2"
rm -rf FILE1 FILE2