summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/chkcopyright30
1 files changed, 19 insertions, 11 deletions
diff --git a/bin/chkcopyright b/bin/chkcopyright
index 4d9ab0a..159d000 100755
--- a/bin/chkcopyright
+++ b/bin/chkcopyright
@@ -505,23 +505,27 @@ SHELL_FILE()
}
-# 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.
+# Check files that use #'s as comments such as Makefile.
+# The Copyright body of text happen to be the same as used by Shell script
+# files.
#
MAKE_FILE()
{
f=$1
- if [ `MATCH_COPYRIGHT $SH_COPYRIGHT $f` = FAILED -a \
- `MATCH_COPYRIGHT $SH_COPYRIGHT2 $f` = FAILED ]; then
- # show the differences with the preferred style.
+ case `MATCH_COPYRIGHT $SH_COPYRIGHT $f` in
+ PASSED)
+ PASSED $f
+ return
+ ;;
+ FAILED)
+ # show the difference
FAILED $f
$DIFF ${EXTRACTEDFILE} ${SH_COPYRIGHT}
- else
- PASSED $f
- fi
+ if [ -n "$FIXIT" ]; then
+ FIX_COPYRIGHT $SH_COPYRIGHT $f
+ fi
+ ;;
+ esac
}
@@ -713,6 +717,10 @@ while read file; do
# Ignore CVS control files.
continue
;;
+ *.txt | *.TXT )
+ # Ignore text files.
+ continue
+ ;;
*)
UNKNOWN_FILE $file
;;