Mercurial > hg > octave-nkf > gnulib-hg
annotate check-copyright @ 17906:d86e349ad92d
getugroups: Fix Android build
* lib/getugroups.c: Don't reference unsupported {get,set,end}grent
functions.
author | Kevin Cernekee <cernekee@google.com> |
---|---|
date | Wed, 11 Feb 2015 15:22:53 -0800 |
parents | ab58d4870664 |
children |
rev | line source |
---|---|
16085
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
1 #!/bin/sh |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
2 # |
17848 | 3 # Copyright (C) 2011-2015 Free Software Foundation, Inc. |
16085
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
4 # |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
5 # This program is free software: you can redistribute it and/or modify |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
6 # it under the terms of the GNU General Public License as published by |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
7 # the Free Software Foundation; either version 3 of the License, or |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 # (at your option) any later version. |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
9 # |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
10 # This program is distributed in the hope that it will be useful, |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
13 # GNU General Public License for more details. |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
14 # |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
15 # You should have received a copy of the GNU General Public License |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
16 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
17 # |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
18 |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
19 error=0 |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
20 for module in `./gnulib-tool --list`; do |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
21 module_license=`./gnulib-tool --extract-license $module` |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
22 if test "$module_license" = 'GPLed build tool'; then |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
23 module_license='GPL' |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
24 fi |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
25 for file in `./gnulib-tool --extract-filelist $module | grep '^\(lib\|build-aux\)/'`; do |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
26 if grep 'GNU General Public' $file > /dev/null; then |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
27 if grep 'version 3 or later' $file > /dev/null \ |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
28 || grep 'either version 3' $file > /dev/null; then |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
29 file_license='GPL' |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
30 else |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
31 if grep 'version 2 or later' $file > /dev/null \ |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
32 || grep 'either version 2' $file > /dev/null; then |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
33 file_license='GPLv2+' |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
34 else |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
35 file_license='GPL??' |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
36 fi |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
37 fi |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
38 else |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
39 if grep 'Lesser General' $file > /dev/null; then |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
40 if grep 'version 3 or later' $file > /dev/null \ |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
41 || grep 'either version 3' $file > /dev/null; then |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
42 file_license='LGPL' |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
43 else |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
44 if grep 'version 2 or later' $file > /dev/null \ |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
45 || grep 'version 2 of the License, or' $file > /dev/null \ |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
46 || grep 'version 2\.1 of the License, or' $file > /dev/null; then |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
47 file_license='LGPLv2+' |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
48 else |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
49 file_license='LGPL??' |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
50 fi |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
51 fi |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
52 else |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
53 file_license='??' |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
54 fi |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
55 fi |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
56 if test "$file_license" != "$module_license"; then |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
57 if test $error = 0; then |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
58 echo "Module License File License File name" |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
59 echo "============== ============== =====================================" |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
60 fi |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
61 printf '%-14s %-14s %s\n' "$module_license" "$file_license" "$file" |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
62 error=1 |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
63 fi |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
64 done |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
65 done |
a4c68ff22172
Syntax check for copyright statements.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
66 exit $error |