about summary refs log tree commit diff
path: root/fedora/makepatch.awk
blob: a87f74130422c9a76203c0c28c13b7d19f14ed4e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/awk -f
/^cvs (diff|server): tag.*is not in file/ {
	print
	next
}
/^cvs (diff|server): Diffing/ {
	next
}
/^\? / {
	next
}
/^Index:/ {
	file=$2
	next
}
/^===============/ {
	next
}
/^RCS/ {
	next
}
/^retrieving/ {
	next
}
/^diff/ {
	next
}
/^---/ {
	if ($2 ~ /^\/dev\/null/ ||
	    $2 ~ /^\/tmp\//)
		$2=file
	if ($2 ~ /.cvsignore$/ ||
	    $2 ~ /^c_stubs/ ||
	    $2 ~ /^rtkaio/ ||
	    $2 ~ /^fedora/ ||
	    $2 ~ /^localedata\/charmaps\/GB18030/ ||
	    $2 ~ /^iconvdata\/gb18030\.c/ ||
	    $2 ~ /^glibc-compat/) {
		hide = 1
		next
	} else {
		hide = 0
	}
	sub(/^---[ 	]*/,"--- " OLDVER "/")
}
/^\+\+\+/ {
	if (hide)
		next
	if ($2 ~ /^\/dev\/null/ ||
	    $2 ~ /^\/tmp\//)
		$2=file
	sub(/^\+\+\+[ 	]*/,"+++ " NEWVER "/")
}
{
	if (hide)
		next
	print
}