summaryrefslogtreecommitdiffstats
path: root/bin/chkcopyright
diff options
context:
space:
mode:
Diffstat (limited to 'bin/chkcopyright')
-rwxr-xr-xbin/chkcopyright39
1 files changed, 22 insertions, 17 deletions
diff --git a/bin/chkcopyright b/bin/chkcopyright
index 83b3648..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.$$
@@ -113,10 +113,10 @@ BUILDCOPYRIGHT()
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code
- * 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.
+ * the COPYING file, which can be found at the root of the source code *
+ * 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. *
EOF
# Fortran9X source Copyright notice
@@ -126,10 +126,10 @@ EOF
! *
! This file is part of HDF5. The full HDF5 copyright notice, including *
! terms governing use, modification, and redistribution, is contained in *
-! the COPYING file, which can be found at the root of the source code
-! 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.
+! the COPYING file, which can be found at the root of the source code *
+! 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. *
EOF
# HTML file Copyright notice
@@ -139,10 +139,10 @@ EOF
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code
- * 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.
+ * the COPYING file, which can be found at the root of the source code *
+ * 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. *
EOF
# Shell style Copyright notice
@@ -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