diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2005-10-11 21:06:17 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2005-10-11 21:06:17 (GMT) |
commit | 76c527a58eec7fa459f2d157f517b945ebfcdfbe (patch) | |
tree | aa25512025ce019b96f6d9e66cbe45b055eefb96 | |
parent | 414249dcea536dd6f8b370212f8e51cf352b0756 (diff) | |
download | hdf5-76c527a58eec7fa459f2d157f517b945ebfcdfbe.zip hdf5-76c527a58eec7fa459f2d157f517b945ebfcdfbe.tar.gz hdf5-76c527a58eec7fa459f2d157f517b945ebfcdfbe.tar.bz2 |
[svn-r11548] Purpose:
Added another case of shell-like style file--if lines leading by #'s
are found, treat it like a shell-like style file.
Platforms tested:
hand tested in heping.
-rwxr-xr-x | bin/chkcopyright | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/bin/chkcopyright b/bin/chkcopyright index 62dd36c..61448d1 100755 --- a/bin/chkcopyright +++ b/bin/chkcopyright @@ -1,17 +1,17 @@ #! /bin/sh -## -## 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://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have -## access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. -## +# +# 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://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have +# access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. +# # Check Copyright notice. # Check that all the files have the proper copyright notice. @@ -19,6 +19,8 @@ # # Programmer: Albert Cheng # Created Data: 2003/07/22 +# Modification: +# Rewrote most of it. Albert Cheng, 2005/10/10. # Setup # @@ -347,13 +349,16 @@ UNKNOWN_FILE() f=$1 head -5 < $f > $tmpfile if head -1 < $tmpfile | grep '^#!' > /dev/null; then - # It is likely a shell script or similar type. + # First line is "#!". It is likely a shell script or similar type. + SHELL_FILE $f + elif grep '^#' < $tmpfile > /dev/null; then + # Some lines start with a "#". It may be a shell like type. SHELL_FILE $f elif grep '\/\*' < $tmpfile > /dev/null; then - # It is C/C++ style file. + # Found some lines containing '/*'. It may be a C/C++ style file. C_SOURCE $f elif grep '^!' < $tmpfile > /dev/null; then - # It is a Fortran 9X style file. + # Some lines start with a "!". It may be a Fortran 9X style file. FORTRAN_SOURCE $f else # Unknown type. @@ -464,6 +469,9 @@ rm -f $EXCEPTIONS $EXTRACTEDFILE rm -f $PASSEDLOG $SKIPPEDLOG $FAILEDLOG # Report Results +# Results are not total accurate--e.g., Passed are not counted, thus not +# reported. +# echo "*******************" echo " REPORT" echo "*******************" |