diff options
Diffstat (limited to 'bin/chkcopyright')
-rwxr-xr-x | bin/chkcopyright | 94 |
1 files changed, 38 insertions, 56 deletions
diff --git a/bin/chkcopyright b/bin/chkcopyright index eec371d..756afe8 100755 --- a/bin/chkcopyright +++ b/bin/chkcopyright @@ -1,7 +1,6 @@ #! /bin/sh # # Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. # # This file is part of HDF5. The full HDF5 copyright notice, including @@ -10,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,8 +37,8 @@ NFIXEDFILES=0 # Number of files fixed. 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. -UICOPYRIGHTSTR="Copyright by the Board of Trustees of the University of Illinois" 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.$$ @@ -111,113 +109,92 @@ BUILDCOPYRIGHT() # C and C++ source Copyright notice cat > ${C_COPYRIGHT} << \EOF * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. 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 cat > ${FTN_COPYRIGHT} << \EOF ! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. 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 cat > ${HTM_COPYRIGHT} << \EOF * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * - * the files COPYING and Copyright.html. COPYING can be found at the root * - * of the source code distribution tree; Copyright.html can be found at the * - * root level of an installed copy of the electronic HDF5 document set and * - * is linked from the top-level documents page. It can also be found at * - * http://hdfgroup.org/HDF5/doc/Copyright.html. 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 cat > ${SH_COPYRIGHT} << \EOF # Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in -# the files COPYING and Copyright.html. COPYING can be found at the root -# of the source code distribution tree; Copyright.html can be found at the -# root level of an installed copy of the electronic HDF5 document set and -# is linked from the top-level documents page. It can also be found at -# http://hdfgroup.org/HDF5/doc/Copyright.html. 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 (2nd type) cat > ${SH_COPYRIGHT2} << \EOF ## Copyright by The HDF Group. -## Copyright by the Board of Trustees of the University of Illinois. ## All rights reserved. ## ## This file is part of HDF5. The full HDF5 copyright notice, including ## terms governing use, modification, and redistribution, is contained in -## the files COPYING and Copyright.html. COPYING can be found at the root -## of the source code distribution tree; Copyright.html can be found at the -## root level of an installed copy of the electronic HDF5 document set and -## is linked from the top-level documents page. It can also be found at -## http://hdfgroup.org/HDF5/doc/Copyright.html. 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 # Windows Batch file Copyright notice cat > ${WINBAT_COPYRIGHT} << \EOF @REM Copyright by The HDF Group. -@REM Copyright by the Board of Trustees of the University of Illinois. @REM All rights reserved. @REM @REM This file is part of HDF5. The full HDF5 copyright notice, including @REM terms governing use, modification, and redistribution, is contained in -@REM the files COPYING and Copyright.html. COPYING can be found at the root -@REM of the source code distribution tree; Copyright.html can be found at the -@REM root level of an installed copy of the electronic HDF5 document set and -@REM is linked from the top-level documents page. It can also be found at -@REM http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -@REM access to either file, you may request a copy from help@hdfgroup.org. +@REM the COPYING file, which can be found at the root of the source code +@REM distribution tree, or in https://www.hdfgroup.org/licenses. +@REM If you do not have access to either file, you may request a copy from +@REM help@hdfgroup.org. EOF # configure.ac file Copyright notice cat > ${CONFIGURE_AC_COPYRIGHT} << \EOF dnl Copyright by The HDF Group. -dnl Copyright by the Board of Trustees of the University of Illinois. dnl All rights reserved. dnl dnl This file is part of HDF5. The full HDF5 copyright notice, including dnl terms governing use, modification, and redistribution, is contained in -dnl the files COPYING and Copyright.html. COPYING can be found at the root -dnl of the source code distribution tree; Copyright.html can be found at the -dnl root level of an installed copy of the electronic HDF5 document set and -dnl is linked from the top-level documents page. It can also be found at -dnl http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -dnl access to either file, you may request a copy from help@hdfgroup.org. +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. EOF } @@ -364,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() @@ -379,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} @@ -404,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() @@ -427,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 |