3 # Copyright 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
4 # This script is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # ck-copyright-notice can be run from the tools directory
15 [ -d src ] || [ "`basename "$dir"`" != tools ] || cd ..
17 # Note: if paragraphs are reformatted, this may need to be updated.
19 lgpl="`sed -n '/version [0-9.]* or any later version/ {
26 # Do not use "find ... | while read file do ... done" because the "do"
27 # part needs to be run in the current shell, and some shells behave in
29 srctests=`find src tests -name '*.[ch]'`
37 # This file doesn't have a copyright notice, but isn't distributed.
40 # This file (which comes from GMP) has a specific copyright notice.
43 file="tools/get_patches.sh" ;;
47 grep -q "Copyright $y.* Free Software Foundation" "$file" && \
48 grep -q "GNU MPFR Library" "$file" && \
49 grep -q "either version $lgpl of the License" "$file" && continue
50 echo "Possibly missing or incorrect copyright notice in $file"