summaryrefslogtreecommitdiffstats
path: root/bin/chkcopyright
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-03-19 23:27:29 (GMT)
committerGitHub <noreply@github.com>2023-03-19 23:27:29 (GMT)
commit59343e893185ef59f9fd93fd715a33ea4e125d7e (patch)
tree84e72ffacccff3b2f8357d40a6b9b217a0c488ac /bin/chkcopyright
parent0704abae0cb5747cfbc168c41d4f40176944dccd (diff)
downloadhdf5-59343e893185ef59f9fd93fd715a33ea4e125d7e.zip
hdf5-59343e893185ef59f9fd93fd715a33ea4e125d7e.tar.gz
hdf5-59343e893185ef59f9fd93fd715a33ea4e125d7e.tar.bz2
Bring bin/ changes from develop (#2595)
Diffstat (limited to 'bin/chkcopyright')
-rwxr-xr-xbin/chkcopyright17
1 files changed, 11 insertions, 6 deletions
diff --git a/bin/chkcopyright b/bin/chkcopyright
index daa7b54..756afe8 100755
--- a/bin/chkcopyright
+++ b/bin/chkcopyright
@@ -9,7 +9,6 @@
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
-#
# Check Copyright notice.
# Check that all the files have the proper copyright notice.
@@ -39,6 +38,7 @@ NFIXFAILEDFILES=0 # Number of files fix failed.
NUMBEGINLINES=60 # Copyright notice should be located within the
# this number of lines at the beginning of the file.
THGCOPYRIGHTSTR="Copyright by The HDF Group."
+UICOPYRIGHTSTR="Copyright by the Board of Trustees of the University of Illinois"
PASSEDLOG=/tmp/h5chkright_passed.$$
SKIPPEDLOG=/tmp/h5chkright_skipped.$$
@@ -194,7 +194,7 @@ dnl terms governing use, modification, and redistribution, is contained in
dnl the COPYING file, which can be found at the root of the source code
dnl distribution tree, or in https://www.hdfgroup.org/licenses.
dnl If you do not have access to either file, you may request a copy from
-dnl help@hdfgroup.org
+dnl help@hdfgroup.org.
EOF
}
@@ -341,7 +341,7 @@ FindLineInFile()
# $1 file which contains the expected copyright notice.
# $2 file in which to look for the copyright notice.
# Copyright notice must be found within the beginning $NUMBEGINLINES of lines.
-# Hunt for the particular string $UICOPYRIGHTSTR which signifies the beginning
+# Hunt for the particular string $THGCOPYRIGHTSTR which signifies the beginning
# of the copyright notice.
#
MATCH_COPYRIGHT()
@@ -356,7 +356,7 @@ MATCH_COPYRIGHT()
nlines=`wc -l ${COPYRIGHTFILE} | cut -f1 -d' '`
# Find a line that contains the copyright string and its line number in
# the file.
- begin=`FindLineInFile "${UICOPYRIGHTSTR}" $f`
+ begin=`FindLineInFile "${THGCOPYRIGHTSTR}" $f`
if [ "$begin" -le 0 ] ; then
# Not found, generate an empty dummy file
cp /dev/null ${EXTRACTEDFILE}
@@ -381,7 +381,7 @@ MATCH_COPYRIGHT()
# $1 file which contains the expected copyright notice.
# $2 file in which to look for the copyright notice.
# Copyright notice must be found within the beginning $NUMBEGINLINES of lines.
-# Hunt for the particular string $UICOPYRIGHTSTR which signifies the beginning
+# Hunt for the particular string $THGCOPYRIGHTSTR which signifies the beginning
# of the copyright notice.
#
FIX_COPYRIGHT()
@@ -404,7 +404,12 @@ FIX_COPYRIGHT()
# the file.
insertbegin=`FindLineInFile "${THGCOPYRIGHTSTR}" $f`
if [ $insertbegin -gt 0 ]; then
- insertend=`expr $insertbegin + $nlines` # no need to -1. See below.
+ insertUIbegin=`FindLineInFile "${UICOPYRIGHTSTR}" $f`
+ if [ $insertUIbegin -gt 0 ]; then
+ insertend=`expr $insertbegin + $nlines + 1`
+ else
+ insertend=`expr $insertbegin + $nlines`
+ fi
else
insertbegin=`FindLineInFile "${UICOPYRIGHTSTR}" $f`
if [ $insertbegin -gt 0 ]; then