#! /bin/sh # Check the copyrights. c1=__wt.copyright.1 c2=__wt.copyright.2 c3=__wt.copyright.3 c4=__wt.copyright.4 check() { # Skip files in which WiredTiger holds no rights. if `egrep "skip $1" dist/s_copyright.list > /dev/null`; then return; fi # It's okay if the file doesn't exist: we may be running in a release # tree with some files removed. test -f $1 || return # Check for a correct copyright header. if `sed -e 2,5p -e 6q -e d $1 | diff - dist/$c1 > /dev/null` ; then return; fi if `sed -e 2,4p -e 5q -e d $1 | diff - dist/$c2 > /dev/null` ; then return; fi if `sed -e 3,6p -e 7q -e d $1 | diff - dist/$c3 > /dev/null` ; then return; fi if `sed -e 3,5p -e 6q -e d $1 | diff - dist/$c4 > /dev/null` ; then return; fi if `sed -e 1,3p -e 4q -e d $1 | diff - dist/$c4 > /dev/null` ; then return; fi echo "$1: copyright information is incorrect" exit 1 } # s_copyright is re-entrant, calling itself with individual file names. # Any single argument call is a file name, check its copyright. if [ $# -ne 0 ]; then check $1 exit 0 fi trap 'rm -f $c1 $c2 $c3 $c4; exit 0' 0 1 2 3 13 15 year=`date +%Y` cat > $c1 < $c2 < $c3 < $c4 <