diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2016-12-17 21:28:53 -0800 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2016-12-17 21:28:53 -0800 |
commit | 54df2afaa61c6a03cbb4a33c9b90fa572b6d07b8 (patch) | |
tree | 18147b92b969d25ffbe61935fb63035cac820dd0 /db-4.8.30/test/scr031 |
Berkeley DB 4.8 with rust build script for linux.
Diffstat (limited to 'db-4.8.30/test/scr031')
-rw-r--r-- | db-4.8.30/test/scr031/chk.copy | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/db-4.8.30/test/scr031/chk.copy b/db-4.8.30/test/scr031/chk.copy new file mode 100644 index 0000000..a752c7a --- /dev/null +++ b/db-4.8.30/test/scr031/chk.copy @@ -0,0 +1,46 @@ +#!/bin/sh - +# +# $Id$ +# +# Check all source files for proper copyright notices. + +d=../.. + +# Test must be run from the top-level directory, not from a test directory. +[ -f $d/LICENSE ] || { + echo 'FAIL: cannot find source distribution directory.' + exit 1 +} + +t1=__1 +t2=__2 + +# create regex for Copyright notice using current year +COPYEXP='Copyright.*'`date +%C%y` + +(cd $d && find . -name '*.[chys]' -o -name '*.cpp' -o -name '*.tcl' \ + -o -name '*.java' -o -name '*.cs' -o -name '*.hpp' | + xargs egrep -l $COPYEXP) > $t1 + +# use sed to remove the files we do not care about, these are the ones +# from 3rd parties that are included in our distribution + +(cd $d && find . -name '*.[chys]' -o -name '*.cpp' -o -name '*.tcl' \ + -o -name '*.java' -o -name '*.cs' -o -name '*.hpp') | tee /tmp/o | + sed -e '/crypto\//d' \ + -e '/sha1.c$/d' \ + -e '/sleepycat\/asm\//d' \ + -e '/perl\//d' \ + -e '/mod_db4\//d' \ + -e '/sqlite\//d' > $t2 + + +if diff $t1 $t2 > /dev/null; then + exit 0 +else + echo "<<< source tree >>> missing copyright notices" + diff $t1 $t2 | grep '>' | awk '{print $2}' + exit 1 +fi + +exit 0 |