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, write to the |
---|
22 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
23 | * Boston, MA 02111-1307, USA. |
---|
24 | */ |
---|
25 | EOF |
---|
26 | } |
---|
27 | |
---|
28 | copyright_gdk () |
---|
29 | { |
---|
30 | cat << EOF |
---|
31 | /* GDK - The GIMP Drawing Kit |
---|
32 | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald |
---|
33 | * |
---|
34 | * This library is free software; you can redistribute it and/or |
---|
35 | * modify it under the terms of the GNU Library General Public |
---|
36 | * License as published by the Free Software Foundation; either |
---|
37 | * version 2 of the License, or (at your option) any later version. |
---|
38 | * |
---|
39 | * This library is distributed in the hope that it will be useful, |
---|
40 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
41 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
42 | * Library General Public License for more details. |
---|
43 | * |
---|
44 | * You should have received a copy of the GNU Library General Public |
---|
45 | * License along with this library; if not, write to the |
---|
46 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
47 | * Boston, MA 02111-1307, USA. |
---|
48 | */ |
---|
49 | EOF |
---|
50 | } |
---|
51 | |
---|
52 | copyright_gtk () |
---|
53 | { |
---|
54 | cat << EOF |
---|
55 | /* GTK - The GIMP Toolkit |
---|
56 | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald |
---|
57 | * |
---|
58 | * This library is free software; you can redistribute it and/or |
---|
59 | * modify it under the terms of the GNU Library General Public |
---|
60 | * License as published by the Free Software Foundation; either |
---|
61 | * version 2 of the License, or (at your option) any later version. |
---|
62 | * |
---|
63 | * This library is distributed in the hope that it will be useful, |
---|
64 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
65 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
66 | * Library General Public License for more details. |
---|
67 | * |
---|
68 | * You should have received a copy of the GNU Library General Public |
---|
69 | * License along with this library; if not, write to the |
---|
70 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
71 | * Boston, MA 02111-1307, USA. |
---|
72 | */ |
---|
73 | EOF |
---|
74 | } |
---|
75 | |
---|
76 | copyright_interp () |
---|
77 | { |
---|
78 | cat << EOF |
---|
79 | /* GTK Interp - The GTK Interpreter |
---|
80 | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald |
---|
81 | * |
---|
82 | * This library is free software; you can redistribute it and/or |
---|
83 | * modify it under the terms of the GNU Library General Public |
---|
84 | * License as published by the Free Software Foundation; either |
---|
85 | * version 2 of the License, or (at your option) any later version. |
---|
86 | * |
---|
87 | * This library is distributed in the hope that it will be useful, |
---|
88 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
89 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
90 | * Library General Public License for more details. |
---|
91 | * |
---|
92 | * You should have received a copy of the GNU Library General Public |
---|
93 | * License along with this library; if not, write to the |
---|
94 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
95 | * Boston, MA 02111-1307, USA. |
---|
96 | */ |
---|
97 | EOF |
---|
98 | } |
---|
99 | |
---|
100 | |
---|
101 | exclude_files="./glib/gconfig.h" |
---|
102 | |
---|
103 | for file in `find . -name "*.[ch]" -print`; do |
---|
104 | exclude=`echo $exclude_files | grep $file` |
---|
105 | |
---|
106 | if test "x$exclude" = "x"; then |
---|
107 | dir=`dirname $file` |
---|
108 | if test "x$dir" != "x."; then |
---|
109 | subdir=`basename $dir` |
---|
110 | |
---|
111 | grepout=`grep Copyright $file` |
---|
112 | if test "x$grepout" = "x"; then |
---|
113 | backup_dir="$dir/bak" |
---|
114 | if test ! -d $backup_dir; then |
---|
115 | echo "making directory: $backup_dir" |
---|
116 | mkdir $backup_dir |
---|
117 | fi |
---|
118 | |
---|
119 | echo $file |
---|
120 | |
---|
121 | filename=`basename $file` |
---|
122 | cp $file $backup_dir/$filename |
---|
123 | copyright_$subdir > $file |
---|
124 | cat $backup_dir/$filename >> $file |
---|
125 | fi |
---|
126 | fi |
---|
127 | fi |
---|
128 | done |
---|