casper-remove-needed-packages-from-unistall-manifest.awk 538 Bytes
Newer Older
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
#!/usr/bin/awk

BEGIN {
	# This is the number of things we're going to remove. Adjust it when changing the regular expression below
	want = 6;
	skipped = 0;
}

function skipit() {
	skip = 1;
	skipped += 1;
	print "removing", $0 >"/dev/stderr"
}

{ skip = 0; }

/^linux-signed-image-.*-generic/ {
	skipit()
}

/^zenity/ {
	skipit()
}

/^(lib(javascriptcoregtk|webkit2gtk))/ {
	skipit()
}

skip == 0 {
	print
}

END {
	if (want != skipped) {
		print "I removed ", skipped, " thingies, wanted ", want > "/dev/stderr"
		exit 1;
	}
	exit 0;
}