]>
git.proxmox.com Git - mirror_kronosnet.git/blob - build-aux/update-copyright.sh
3 # Copyright (C) 2017-2019 Red Hat, Inc. All rights reserved.
5 # Author: Fabio M. Di Nitto <fabbione@kronosnet.org>
7 # This software licensed under GPL-2.0+
10 # script to update copyright dates across the tree
14 input
=$
(grep -ril -e "Copyright.*Red Hat" |
grep -v .swp |
grep -v update-copyright |
grep -v doxyxml.c
)
16 startdate
=$
(git log
--follow "$i" |
grep ^Date
: |
tail -n 1 |
awk '{print $6}')
17 if [ "$startdate" != "$enddate" ]; then
18 sed -i -e 's#Copyright (C).*Red Hat#Copyright (C) '$startdate'-'$enddate' Red Hat#g' $i
20 sed -i -e 's#Copyright (C).*Red Hat#Copyright (C) '$startdate' Red Hat#g' $i
24 input
=$
(find .
-type f |
grep -v ".git")
26 if [ -z "$(grep -i "Copyright
" $i)" ]; then
27 echo "WARNING: $i appears to be missing Copyright information"