| 1 |
#!/bin/sh |
| 2 |
# |
| 3 |
# script used to gather/commit updated copyrights not done by the authors |
| 4 |
YEAR=2019 |
| 5 |
|
| 6 |
cd ~/libreswan |
| 7 |
|
| 8 |
for i in `git log --since $YEAR/01/01 |grep ^commit | sed "s/commit //"`; |
| 9 |
do |
| 10 |
export a=`git show $i | grep -E "Author" | sed "s/Author: //"`; |
| 11 |
for f in `git show $i | grep "+++ b\/" |sed "s/^......//"`; |
| 12 |
do |
| 13 |
sed -i "s/^\(.*Copyright ... ....\)\([-,]\)20.. $a/\1-$YEAR $a/" $f |
| 14 |
sed -i "s/^\(.*Copyright ... ....\) $a/\1-$YEAR $a/" $f |
| 15 |
# builds a list of copyright lines that still needs to added semi-manually |
| 16 |
grep -E "Copyright.* $a" $f || echo "$f: Copyright (C) $YEAR $a" |
| 17 |
done |
| 18 |
done |