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

http://github.com/xbmc/xbmc · AWK · 85 lines · 73 code · 12 blank · 0 comment · 15 complexity · 6e3634a5c581c5d3c399828081c1701e MD5 · raw file

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