Browse code

initial GPLization scripts introduced

Jiri Kuthan authored on 19/09/2002 11:49:05
Showing 2 changed files
1 1
new file mode 100755
... ...
@@ -0,0 +1,6 @@
0
+#!/bin/sh 
1
+
2
+for i in `find . -name '*.[hc]'` ; do
3
+	mv $i $i.pregpl
4
+	awk -f test/gplize.awk $i.pregpl > $i
5
+done
0 6
new file mode 100644
... ...
@@ -0,0 +1,62 @@
0
+# add copyright banner after the first comment
1
+#
2
+# text taken from file_copyright.txt
3
+
4
+BEGIN {
5
+	status=0;
6
+}
7
+
8
+
9
+status==1 {
10
+	print 
11
+	next
12
+}
13
+
14
+# end of comment not encountered yet
15
+
16
+{ comment_begin=0 }
17
+
18
+/\/\*/ { comment_begin=1; }
19
+
20
+
21
+/\*\// {
22
+	status=1
23
+	# if it was a one-line comment print it and start a new comment
24
+	if (comment_begin==1) {
25
+		print
26
+		print "/*"
27
+	}
28
+
29
+	print " *"
30
+	print " * Copyright (C) 2001-2003 Fhg Fokus"
31
+	print " *"
32
+	print " * This file is part of ser, a free SIP server."
33
+	print " *"
34
+	print " * ser is free software; you can redistribute it and/or modify"
35
+	print " * it under the terms of the GNU General Public License as published by"
36
+	print " * the Free Software Foundation; either version 2 of the License, or"
37
+	print " * (at your option) any later version"
38
+	print " *"
39
+	print " * For a license to use the ser software under conditions"
40
+	print " * other than those described here, or to purchase support for this"
41
+	print " * software, please contact iptel.org by e-mail at the following addresses:"
42
+	print " *    info@iptel.org"
43
+	print " *"
44
+	print " * ser is distributed in the hope that it will be useful,"
45
+	print " * but WITHOUT ANY WARRANTY; without even the implied warranty of"
46
+	print " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the"
47
+	print " * GNU General Public License for more details."
48
+	print " *"
49
+	print " * You should have received a copy of the GNU General Public License "
50
+	print " * along with this program; if not, write to the Free Software "
51
+	print " * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA"
52
+	print " */"
53
+	print ""
54
+
55
+	# don't print the original end of comment
56
+	next
57
+}
58
+
59
+# end of comment not encountered yet -- print the line
60
+
61
+{ print }