summaryrefslogtreecommitdiffstats
path: root/bin/chkcopyright
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2007-02-08 04:13:59 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2007-02-08 04:13:59 (GMT)
commit7b8a112b5f20fa0fb13123b0e4b5a87dd5d41d4d (patch)
treed72c027dbd7505707d692421d56a5994c2d3a2ed /bin/chkcopyright
parente4d94d794375da9b6b8e407c8b3bd367b3d9ae06 (diff)
downloadhdf5-7b8a112b5f20fa0fb13123b0e4b5a87dd5d41d4d.zip
hdf5-7b8a112b5f20fa0fb13123b0e4b5a87dd5d41d4d.tar.gz
hdf5-7b8a112b5f20fa0fb13123b0e4b5a87dd5d41d4d.tar.bz2
[svn-r13268] Added VMS COMMAND files support.
Tested: kagiso.
Diffstat (limited to 'bin/chkcopyright')
-rwxr-xr-xbin/chkcopyright43
1 files changed, 43 insertions, 0 deletions
diff --git a/bin/chkcopyright b/bin/chkcopyright
index 159d000..3428457 100755
--- a/bin/chkcopyright
+++ b/bin/chkcopyright
@@ -56,6 +56,7 @@ 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
+VMSCMD_COPYRIGHT=/tmp/h5chkright_VMSCMD.$$ # VMS command file Copyright notice
tmpfixfile=/tmp/h5chkright_fix.$$ # Temporary fixed copy of file
@@ -182,6 +183,22 @@ EOF
@REM access to either file, you may request a copy from help@hdfgroup.org.
EOF
+ # VMS command file Copyright notice
+ cat > ${VMSCMD_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.
+EOF
+
}
# Initialization
@@ -551,6 +568,28 @@ BATCH_FILE()
}
+# Check Windows Batch files
+#
+VMSCMD_FILE()
+{
+ f=$1
+ case `MATCH_COPYRIGHT $VMSCMD_COPYRIGHT $f` in
+ PASSED)
+ PASSED $f
+ return
+ ;;
+ FAILED)
+ # show the difference
+ FAILED $f
+ $DIFF ${EXTRACTEDFILE} ${VMSCMD_COPYRIGHT}
+ if [ -n "$FIXIT" ]; then
+ FIX_COPYRIGHT $VMSCMD_COPYRIGHT $f
+ fi
+ ;;
+ esac
+}
+
+
# Check Unknown type file.
# First check if there is something that resemble a copyright notice in
# the first "page". If so, then inspect the first 5 lines to guess what
@@ -697,6 +736,10 @@ while read file; do
# Windows Batch files
BATCH_FILE ${file}
;;
+ *.com )
+ # VMS Command files
+ VMSCMD_FILE ${file}
+ ;;
*.h5 | *.hdf5 )
# Ignore HDF5 data files
continue