summary refs log tree commit diff
path: root/fedora/makepatch.awk
blob: fba827de4b312f419354989293236d1905c9c682 (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
#!/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/) {
		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
}