[6253ed] | 1 | #
|
---|
| 2 | # MoleCuilder - creates and alters molecular systems
|
---|
| 3 | # Copyright (C) 2008-2012 University of Bonn
|
---|
[5aaa43] | 4 | # Copyright (C) 2013 Frederik Heber
|
---|
[6253ed] | 5 | #
|
---|
| 6 | # This program is free software: you can redistribute it and/or modify
|
---|
| 7 | # it under the terms of the GNU General Public License as published by
|
---|
| 8 | # the Free Software Foundation, either version 3 of the License, or
|
---|
| 9 | # (at your option) any later version.
|
---|
| 10 | #
|
---|
| 11 | # This program is distributed in the hope that it will be useful,
|
---|
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 14 | # GNU General Public License for more details.
|
---|
| 15 | #
|
---|
| 16 | # You should have received a copy of the GNU General Public License
|
---|
| 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>.
|
---|
| 18 | #
|
---|
[abae35] | 19 | AT_SETUP([Checking for present project disclaimer])
|
---|
| 20 | AT_KEYWORDS([CodeCheck disclaimer])
|
---|
[d2596b] | 21 | ok="unity.cpp pugixml.cpp"
|
---|
[abae35] | 22 | echo `pwd`
|
---|
| 23 | echo "${#ok[*]} are ok to not contain config.h: ${ok[*]}."
|
---|
| 24 | liste=`find ${abs_top_srcdir}/src -name '*.cpp'`
|
---|
| 25 | for file in $liste
|
---|
| 26 | do
|
---|
| 27 | # check whether its one of the excluded ones
|
---|
| 28 | found=0
|
---|
| 29 | for item in $ok
|
---|
| 30 | do
|
---|
| 31 | if test "$item" == "`basename $file`"
|
---|
| 32 | then
|
---|
| 33 | found=1
|
---|
| 34 | break
|
---|
| 35 | fi
|
---|
| 36 | done
|
---|
| 37 | # if not, check whether it contains the include
|
---|
| 38 | if test $found -eq 0
|
---|
| 39 | then
|
---|
| 40 | AT_CHECK([egrep -q " * Project: MoleCuilder" $file], 0, [ignore], [ignore], [echo "Could not find project disclaimer in $file."])
|
---|
[5aaa43] | 41 | AT_CHECK([egrep -q " * Copyright.* University of Bonn" $file], 0, [ignore], [ignore], [
|
---|
| 42 | AT_CHECK([egrep -q " * Copyright.* Frederik Heber" $file], 0, [ignore], [ignore], [echo "Could not find copyright with current year ${year} in $file."])])
|
---|
| 43 | AT_CHECK([egrep -q " * MoleCuilder is free software" $file], 0, [ignore], [ignore], [echo "Could not find MoleCuilder reference in $file."])
|
---|
[abae35] | 44 | fi
|
---|
| 45 | done
|
---|
| 46 | AT_CLEANUP
|
---|