summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2005-11-09 22:23:58 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2005-11-09 22:23:58 (GMT)
commitf70640457be1cb6159bbcca4c1f082b8c72a3e5f (patch)
treed727c82ebc120d08942c4c987dd0e3f4efc14ff7 /bin
parent9c0f8180e78624ca27027fd184ada2d69938b17e (diff)
downloadhdf5-f70640457be1cb6159bbcca4c1f082b8c72a3e5f.zip
hdf5-f70640457be1cb6159bbcca4c1f082b8c72a3e5f.tar.gz
hdf5-f70640457be1cb6159bbcca4c1f082b8c72a3e5f.tar.bz2
[svn-r11696] Purpose:
Improvement Description: The previous HTML files strategy was to expect the very first comment block is the copyright notice. That did not work well as more and more other comments appear now. Solution: Changed the strategy to look for the only the essential body of copyright notice. This no longer verifies this body of text is a comment block. But the previous strategy is not really bullet-proof either. Platforms tested: tested in heping.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/chkcopyright26
1 files changed, 10 insertions, 16 deletions
diff --git a/bin/chkcopyright b/bin/chkcopyright
index cdc308a..b79b8ff 100755
--- a/bin/chkcopyright
+++ b/bin/chkcopyright
@@ -107,8 +107,6 @@ EOF
# HTML file Copyright notice
cat > ${HTM_COPYRIGHT} << \EOF
-<!--
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
@@ -120,8 +118,6 @@ EOF
* 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
# Shell style Copyright notice
@@ -354,19 +350,17 @@ FORTRAN_SOURCE()
HTML_FILE()
{
f=$1
- COPYRIGHTFILE=$HTM_COPYRIGHT
- # Must use stdin for wc to prevent filename from popping up.
- nlines=`wc -l < ${COPYRIGHTFILE}| tr -d ' '`
- sed -n -e '/^<!--/,/^ -->/p' < $f | head -${nlines} > ${EXTRACTEDFILE}
- RINSE ${EXTRACTEDFILE}
- $DIFF ${EXTRACTEDFILE} ${COPYRIGHTFILE} >/dev/null 2>&1
- if test $? -ne 0; then
- # show the differences
- FAILED $f
- $DIFF ${EXTRACTEDFILE} ${COPYRIGHTFILE}
- else
+ case `MATCH_COPYRIGHT $HTM_COPYRIGHT $f` in
+ PASSED)
PASSED $f
- fi
+ return
+ ;;
+ FAILED)
+ # show the difference
+ FAILED $f
+ $DIFF ${EXTRACTEDFILE} ${HTM_COPYRIGHT}
+ ;;
+ esac
}