summaryrefslogtreecommitdiffstats
path: root/bin/chkcopyright
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2003-08-11 21:32:17 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2003-08-11 21:32:17 (GMT)
commit1c03bdd2ffaaa4edb4578c304d8d92109d224f4c (patch)
tree4f0d03941acdf667fb1f69da0fe440b52039a899 /bin/chkcopyright
parent641f9f2fea80a3484c7a3a8376114a929b75033c (diff)
downloadhdf5-1c03bdd2ffaaa4edb4578c304d8d92109d224f4c.zip
hdf5-1c03bdd2ffaaa4edb4578c304d8d92109d224f4c.tar.gz
hdf5-1c03bdd2ffaaa4edb4578c304d8d92109d224f4c.tar.bz2
[svn-r7344] Purpose:
feature Description: Added the checking for Makefile. Skip checking CVS files. Printed filename of unknown file types. Platforms tested: No h5committest. Tested by hand on various files. Misc. update:
Diffstat (limited to 'bin/chkcopyright')
-rwxr-xr-xbin/chkcopyright40
1 files changed, 39 insertions, 1 deletions
diff --git a/bin/chkcopyright b/bin/chkcopyright
index d092482..53f1478 100755
--- a/bin/chkcopyright
+++ b/bin/chkcopyright
@@ -193,6 +193,37 @@ EOF
}
+# Check Makefile
+#
+MAKE_FILE()
+{
+ f=$1
+ cat > ${COPYRIGHTFILE} << \EOF
+##
+## 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.
+##
+EOF
+ # Must use stdin for wc to prevent filename from popping up.
+ nlines=`wc -l < ${COPYRIGHTFILE}| tr -d ' '`
+ head -${nlines} $f | $DIFF - ${COPYRIGHTFILE} >/dev/null 2>&1
+ if test $? -ne 0; then
+ # show the differences
+ echo ${f}:
+ head -${nlines} $f | $DIFF - ${COPYRIGHTFILE}
+ fi
+}
+
+
#
# Main body
@@ -214,8 +245,15 @@ while read file; do
*.sh | *.sh.in )
SHELL_FILE ${file}
;;
+ *Makefile | *Makefile.in )
+ MAKE_FILE ${file}
+ ;;
+ *CVS/* )
+ # Skip
+ continue
+ ;;
*)
- echo Unknown file type
+ echo "Unknown file type (${file})"
;;
esac
done