PageRenderTime 15ms CodeModel.GetById 8ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 1ms

/xbmc/screensavers/rsxs-0.9/scripts/uninstall.awk

http://github.com/xbmc/xbmc
AWK | 85 lines | 73 code | 12 blank | 0 comment | 0 complexity | 6e3634a5c581c5d3c399828081c1701e MD5 | raw file
 1BEGIN {
 2	if (skip !~ /cyclone/)
 3		remove["rs-cyclone"] = 1
 4	
 5	if (skip !~ /euphoria/) {
 6		remove["\\(regular\\)\" rs-euphoria"] = 1
 7		remove["\\(grid\\)\" rs-euphoria"] = 1
 8		remove["\\(cubism\\)\" rs-euphoria"] = 1
 9		remove["\\(bad math\\)\" rs-euphoria"] = 1
10		remove["\\(M-theory\\)\" rs-euphoria"] = 1
11		remove["\\(UHF TEM\\)\" rs-euphoria"] = 1
12		remove["\\(nowhere\\)\" rs-euphoria"] = 1
13		remove["\\(echo\\)\" rs-euphoria"] = 1
14		remove["\\(kaleidoscope\\)\" rs-euphoria"] = 1
15	}
16	
17	if (skip !~ /fieldlines/)
18		remove["rs-fieldlines"] = 1
19	
20	if (skip !~ /flocks/)
21		remove["rs-flocks"] = 1
22	
23	if (skip !~ /flux/) {
24		remove["\\(regular\\)\" rs-flux"] = 1
25		remove["\\(hypnotic\\)\" rs-flux"] = 1
26		remove["\\(insane\\)\" rs-flux"] = 1
27		remove["\\(sparklers\\)\" rs-flux"] = 1
28		remove["\\(paradigm\\)\" rs-flux"] = 1
29		remove["\\(fusion\\)\" rs-flux"] = 1
30	}
31	
32	if (skip !~ /helios/)
33		remove["rs-helios"] = 1
34	
35	if (skip !~ /hyperspace/)
36		remove["rs-hyperspace"] = 1
37	
38	if (skip !~ /lattice/) {
39		remove["\\(regular\\)\" rs-lattice"] = 1
40		remove["\\(chainmail\\)\" rs-lattice"] = 1
41		remove["\\(brass mesh\\)\" rs-lattice"] = 1
42		remove["\\(computer\\)\" rs-lattice"] = 1
43		remove["\\(slick\\)\" rs-lattice"] = 1
44		remove["\\(tasty\\)\" rs-lattice"] = 1
45	}
46	
47	if (skip !~ /plasma/)
48		remove["rs-plasma"] = 1
49	
50	if (skip !~ /skyrocket/)
51		remove["rs-skyrocket"] = 1
52	
53	if (skip !~ /solarwinds/) {
54		remove["\\(regular\\)\" rs-solarwinds"] = 1
55		remove["\\(cosmic strings\\)\" rs-solarwinds"] = 1
56		remove["\\(cold pricklies\\)\" rs-solarwinds"] = 1
57		remove["\\(space fur\\)\" rs-solarwinds"] = 1
58		remove["\\(jiggly\\)\" rs-solarwinds"] = 1
59		remove["\\(undertow\\)\" rs-solarwinds"] = 1
60	}
61}
62
63/^[ \t]*\*programs:/ {
64	print
65	output = ""
66	do {
67		getline
68		doRemove = ""
69		for (name in remove)
70			if ($0 ~ name)
71				doRemove = name
72		if (doRemove)
73			delete remove[doRemove]
74		else
75			output = output $0 ORS
76	} while ($0 ~ /\\$/)
77	ORS=""
78	print output
79	next
80}
81
82! /^[ \t]*\*programs:/ {
83	ORS="\n"
84	print
85}