|
Lines 42-56
Link Here
|
| 42 |
|
42 |
|
| 43 |
# List of all files missing copyrights |
43 |
# List of all files missing copyrights |
| 44 |
touch BadOrMissingCopyrights |
44 |
touch BadOrMissingCopyrights |
|
|
45 |
touch ThirdPartyFiles |
| 45 |
cat CheckedFiles | while read i; do |
46 |
cat CheckedFiles | while read i; do |
| 46 |
if [[ `grep -c "http://www.eclipse.org/legal/epl-v10.html" "$i"` = 0 || `grep -c "Copyright" "$i"` = 0 ]];then |
47 |
if [[ `grep -c "http://www.eclipse.org/legal/epl-v10.html" "$i"` = 0 || `grep -c "Copyright" "$i"` = 0 ]];then |
| 47 |
echo $i >>BadOrMissingCopyrights |
48 |
{ |
|
|
49 |
if [ `echo $i | grep -v tptp | grep -v hyades` ];then |
| 50 |
{ |
| 51 |
echo $i >>ThirdPartyFiles |
| 52 |
} |
| 53 |
else |
| 54 |
echo $i >>BadOrMissingCopyrights |
| 55 |
fi |
| 56 |
} |
| 48 |
else |
57 |
else |
| 49 |
echo $i >>FilesWithCopyrights |
58 |
{ |
| 50 |
fi |
59 |
if [ `echo $i | grep -v tptp | grep -v hyades` ];then |
|
|
60 |
{ |
| 61 |
echo $i >>ThirdPartyFiles |
| 62 |
} |
| 63 |
else |
| 64 |
echo $i >>FilesWithCopyrights |
| 65 |
fi |
| 66 |
} |
| 67 |
fi |
| 51 |
done |
68 |
done |
| 52 |
|
69 |
|
| 53 |
if [[ ! -s BadOrMissingCopyrights ]]; |
70 |
if [[ ! -s BadOrMissingCopyrights ]]; |
| 54 |
then echo "This report is clean :)" >> BadOrMissingCopyrights |
71 |
then echo "This report is clean :)" >> BadOrMissingCopyrights |
| 55 |
fi |
72 |
fi |
| 56 |
|
73 |
|
|
Lines 61-67
Link Here
|
| 61 |
do |
78 |
do |
| 62 |
yr=`ls -l --time-style=+%Y "$FILE" | awk '{ print $6 }'` |
79 |
yr=`ls -l --time-style=+%Y "$FILE" | awk '{ print $6 }'` |
| 63 |
query=`grep -L "Copyright.*$yr" "$FILE"` |
80 |
query=`grep -L "Copyright.*$yr" "$FILE"` |
| 64 |
|
81 |
|
| 65 |
# Include the file in copyright report if copyright year doesn't match last modified date |
82 |
# Include the file in copyright report if copyright year doesn't match last modified date |
| 66 |
if [[ "X$query" != "X" ]]; then |
83 |
if [[ "X$query" != "X" ]]; then |
| 67 |
let count++ |
84 |
let count++ |
|
Lines 74-79
Link Here
|
| 74 |
fi |
91 |
fi |
| 75 |
|
92 |
|
| 76 |
# Copies all the reports to the published directory |
93 |
# Copies all the reports to the published directory |
| 77 |
for file in Patterns CheckedFiles BadOrMissingCopyrights FilesWithCopyrights NeedUpdate; do |
94 |
for file in Patterns CheckedFiles BadOrMissingCopyrights FilesWithCopyrights NeedUpdate ThirdPartyFiles; do |
| 78 |
cat "$file" >> "$publishDir/$file" |
95 |
cat "$file" >> "$publishDir/$file" |
| 79 |
done |
96 |
done |