]> Pileus Git - ~andy/gtk/blob - makecopyright
stylecontext: Do invalidation on first resize container
[~andy/gtk] / makecopyright
1 #!/bin/sh
2
3
4 copyright_glib ()
5 {
6   cat << EOF
7 /* GLIB - Library of useful routines for C programming
8  * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Library General Public
12  * License as published by the Free Software Foundation; either
13  * version 2 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Library General Public License for more details.
19  *
20  * You should have received a copy of the GNU Library General Public
21  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
22  */
23 EOF
24 }
25
26 copyright_gdk ()
27 {
28   cat << EOF
29 /* GDK - The GIMP Drawing Kit
30  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
31  *
32  * This library is free software; you can redistribute it and/or
33  * modify it under the terms of the GNU Library General Public
34  * License as published by the Free Software Foundation; either
35  * version 2 of the License, or (at your option) any later version.
36  *
37  * This library is distributed in the hope that it will be useful,
38  * but WITHOUT ANY WARRANTY; without even the implied warranty of
39  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
40  * Library General Public License for more details.
41  *
42  * You should have received a copy of the GNU Library General Public
43  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
44  */
45 EOF
46 }
47
48 copyright_gtk ()
49 {
50   cat << EOF
51 /* GTK - The GIMP Toolkit
52  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
53  *
54  * This library is free software; you can redistribute it and/or
55  * modify it under the terms of the GNU Library General Public
56  * License as published by the Free Software Foundation; either
57  * version 2 of the License, or (at your option) any later version.
58  *
59  * This library is distributed in the hope that it will be useful,
60  * but WITHOUT ANY WARRANTY; without even the implied warranty of
61  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
62  * Library General Public License for more details.
63  *
64  * You should have received a copy of the GNU Library General Public
65  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
66  */
67 EOF
68 }
69
70 copyright_interp ()
71 {
72   cat << EOF
73 /* GTK Interp - The GTK Interpreter
74  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
75  *
76  * This library is free software; you can redistribute it and/or
77  * modify it under the terms of the GNU Library General Public
78  * License as published by the Free Software Foundation; either
79  * version 2 of the License, or (at your option) any later version.
80  *
81  * This library is distributed in the hope that it will be useful,
82  * but WITHOUT ANY WARRANTY; without even the implied warranty of
83  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
84  * Library General Public License for more details.
85  *
86  * You should have received a copy of the GNU Library General Public
87  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
88  */
89 EOF
90 }
91
92
93 exclude_files="./glib/gconfig.h"
94
95 for file in `find . -name "*.[ch]" -print`; do
96   exclude=`echo $exclude_files | grep $file`
97
98   if test "x$exclude" = "x"; then
99     dir=`dirname $file`
100     if test "x$dir" != "x."; then
101       subdir=`basename $dir`
102
103       grepout=`grep Copyright $file`
104       if test "x$grepout" = "x"; then
105         backup_dir="$dir/bak"
106         if test ! -d $backup_dir; then
107           echo "making directory: $backup_dir"
108           mkdir $backup_dir
109         fi
110
111         echo $file
112
113         filename=`basename $file`
114         cp $file $backup_dir/$filename
115         copyright_$subdir > $file
116         cat $backup_dir/$filename >> $file
117       fi
118     fi
119   fi
120 done