summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2007-02-07 19:44:07 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2007-02-07 19:44:07 (GMT)
commitf58be09c77fbe1ead74e507b904b295429ca7ab2 (patch)
tree9a8696f4527584d205b1ffdec0ddc1b4f3e2330b /bin
parent26b908439db0c322dc6d3ac6b79dd3740a943a81 (diff)
downloadhdf5-f58be09c77fbe1ead74e507b904b295429ca7ab2.zip
hdf5-f58be09c77fbe1ead74e507b904b295429ca7ab2.tar.gz
hdf5-f58be09c77fbe1ead74e507b904b295429ca7ab2.tar.bz2
[svn-r13259] Separated the processing of Shell-script files from Make-style files.
Tested in kagiso.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/chkcopyright32
1 files changed, 30 insertions, 2 deletions
diff --git a/bin/chkcopyright b/bin/chkcopyright
index 4f67c78..4d9ab0a 100755
--- a/bin/chkcopyright
+++ b/bin/chkcopyright
@@ -483,13 +483,35 @@ HTML_FILE()
}
+# Check Shell script files which use the style of copyright notice of leading #'s.
+#
+SHELL_FILE()
+{
+ f=$1
+ case `MATCH_COPYRIGHT $SH_COPYRIGHT $f` in
+ PASSED)
+ PASSED $f
+ return
+ ;;
+ FAILED)
+ # show the difference
+ FAILED $f
+ $DIFF ${EXTRACTEDFILE} ${SH_COPYRIGHT}
+ if [ -n "$FIXIT" ]; then
+ FIX_COPYRIGHT $SH_COPYRIGHT $f
+ fi
+ ;;
+ esac
+}
+
+
# Check Shell script files and other files (e.g., Makefile) that use
# the style of copyright notice of leading #'s.
# There is a preferred style (single leading #) vs the alternate style (double
# leading #'s). The double leading #'s style is used in Makefile.am, for
# example.
#
-SHELL_FILE()
+MAKE_FILE()
{
f=$1
if [ `MATCH_COPYRIGHT $SH_COPYRIGHT $f` = FAILED -a \
@@ -517,6 +539,9 @@ BATCH_FILE()
# show the difference
FAILED $f
$DIFF ${EXTRACTEDFILE} ${WINBAT_COPYRIGHT}
+ if [ -n "$FIXIT" ]; then
+ FIX_COPYRIGHT $WINBAT_COPYRIGHT $f
+ fi
;;
esac
}
@@ -658,9 +683,12 @@ while read file; do
*.htm | *.html )
HTML_FILE ${file}
;;
- *.sh | *.sh.in | *Makefile | *Makefile.in | *Makefile.am )
+ *.sh | *.sh.in )
SHELL_FILE ${file}
;;
+ *Makefile | *Makefile.in | *Makefile.am )
+ MAKE_FILE ${file}
+ ;;
*.bat | *.BAT )
# Windows Batch files
BATCH_FILE ${file}