summaryrefslogtreecommitdiffstats
path: root/bin/chkcopyright
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2005-11-01 15:08:36 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2005-11-01 15:08:36 (GMT)
commitc931d254998f283b4bbc4f0484569c0053a24a1c (patch)
tree03f29475528be49fe6b3de9c3399c73b1d13e7b6 /bin/chkcopyright
parent617522e467c817811d80d60ce7e97212c9df4059 (diff)
downloadhdf5-c931d254998f283b4bbc4f0484569c0053a24a1c.zip
hdf5-c931d254998f283b4bbc4f0484569c0053a24a1c.tar.gz
hdf5-c931d254998f283b4bbc4f0484569c0053a24a1c.tar.bz2
[svn-r11648] Purpose:
Feature Description: Added copyright detection for Windows files, *.dsw, *.dsp, *.zip (these are ignored), and *.bat files. Platforms tested: heping.
Diffstat (limited to 'bin/chkcopyright')
-rwxr-xr-xbin/chkcopyright44
1 files changed, 44 insertions, 0 deletions
diff --git a/bin/chkcopyright b/bin/chkcopyright
index 8df68d3..aa4098f 100755
--- a/bin/chkcopyright
+++ b/bin/chkcopyright
@@ -48,6 +48,7 @@ FTN_COPYRIGHT=/tmp/h5chkright_FTN.$$ # Fortran style copyright
HTM_COPYRIGHT=/tmp/h5chkright_HTM.$$ # HTML style copyright
SH_COPYRIGHT=/tmp/h5chkright_SH.$$ # SHELL style copyright
SH_COPYRIGHT2=/tmp/h5chkright_SH2.$$ # SHELL style copyright, 2nd style.
+WINBAT_COPYRIGHT=/tmp/h5chkright_WINBAT.$$ # Windows Batch file Copyright notice
# Help page
@@ -153,6 +154,21 @@ EOF
## access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
EOF
+ # Windows Batch file Copyright notice
+ cat > ${WINBAT_COPYRIGHT} << \EOF
+@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://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have
+@REM access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
+EOF
+
}
# Initialization
@@ -347,6 +363,26 @@ SHELL_FILE()
}
+# Check Windows Batch files
+#
+BATCH_FILE()
+{
+ f=$1
+ echo matching it as batch file
+ case `MATCH_COPYRIGHT $WINBAT_COPYRIGHT $f` in
+ PASSED)
+ PASSED $f
+ return
+ ;;
+ FAILED)
+ # show the difference
+ FAILED $f
+ $DIFF ${EXTRACTEDFILE} ${WINBAT_COPYRIGHT}
+ ;;
+ esac
+}
+
+
# Check Unknown type file.
# Inspect the first 5 lines and try to guess what type of file it is.
# Then try verify Copyright notice according to guessed type.
@@ -453,6 +489,10 @@ while read file; do
*.sh | *.sh.in | *Makefile | *Makefile.in | *Makefile.am )
SHELL_FILE ${file}
;;
+ *.bat | *.BAT )
+ # Windows Batch files
+ BATCH_FILE ${file}
+ ;;
*.h5 | *.hdf5 )
# Ignore HDF5 data files
continue
@@ -461,6 +501,10 @@ while read file; do
# Ignore binary data files
continue
;;
+ *.zip | *.dsp | *.dsw)
+ # Ignore Windows binary files
+ continue
+ ;;
*CVS/* )
# Ignore CVS control files.
continue