l_patch.sh 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #!/bin/bash
  2. # Set build configuration in Makefile.defaults
  3. for opt in \
  4. NETSURF_UA_FORMAT_STRING='"NetSurf/%d.%d (%s; Arch Linux)"' \
  5. NETSURF_USE_DUKTAPE=YES
  6. do
  7. setconf Makefile.defaults "$opt"
  8. done
  9. # remove non-privacy search engines
  10. sed -i '\|Google|d
  11. \|Yahoo|d
  12. \|Bing|d
  13. \|Business.com|d
  14. \|Omgili|d
  15. \|BBC News|d
  16. \|Ubuntu Packages|d
  17. \|Ask[.]com|d
  18. \|Answers.com|d
  19. \|Youtube|d
  20. \|AeroMp3|d
  21. \|AOL|d
  22. \|Baidu|d
  23. \|Amazon|d
  24. \|Ebay|d
  25. \|IMDB|d
  26. \|ESPN|d
  27. s|DuckDuckGo|DuckDuckGo HTML|
  28. s|duckduckgo[.]com|duckduckgo.com/html|
  29. s|duckduckgo[.]com/html/favicon.ico|duckduckgo.com/favicon.ico|
  30. s|seeks-project.info|seeks.fr|g
  31. ' frontends/riscos/appdir/Resources/SearchEngines \
  32. resources/SearchEngines
  33. sed -i '\|readable name such as| s|google|duckduckgo|
  34. \|readable name such as| s|yahoo|seeks|
  35. \|host address such as www[.]google[.]com| s|google[.]com|duckduckgo.com/html|
  36. s|google[.]com?search=%s|duckduckgo.com/html/?q=%s|
  37. \|return strdup| s|google[.]com|duckduckgo.com/html|
  38. \|return strdup| s|google|duckduckgo|
  39. \|return strdup| s|duckduckgo[.]com/html/favicon[.]ico|duckduckgo.com/favicon.ico|
  40. s|www[.]google[.]com/search?q=%s|duckduckgo.com/html/?q=%s|
  41. ' desktop/searchweb.c
  42. sed -i 's|google[.][.a-z]\{0,6\}/search|duckduckgo.com/html/search|
  43. s|Google-Suche|DuckDuckGo HTML|
  44. s|Google Search|DuckDuckGo HTML|
  45. s|Ricerca Google|DuckDuckGo HTML|
  46. s|Google検索|DuckDuckGo HTML|
  47. \|BBC News|d
  48. \|Reuters|d
  49. \|CNN|d
  50. \|Slashdot|d
  51. \|Ars Technica|d
  52. \|The Register|d
  53. \|W3C|d
  54. s|google[.][.a-z]\{0,6\}|duckduckgo.com/html|
  55. s|Google|DuckDuckGo HTML|
  56. s|[.a-z]\{0,4\}yahoo[.]co[.a-z]\{0,4\}|www.seeks.fr|
  57. s|Yahoo!|Seeks|
  58. \|IMDB|d
  59. s|The Icon Bar|Creative Commons|
  60. s|www[.]iconbar[.]com|creativecommons.org|
  61. s|ROOL|Dictionary.com|
  62. s|www[.]riscosopen[.]org|dictionary.reference.com|
  63. \|riscos.info|d
  64. ' frontends/riscos/appdir/Resources/de/welcome.html\,faf \
  65. frontends/riscos/appdir/Resources/en/welcome.html\,faf \
  66. frontends/riscos/appdir/Resources/it/welcome.html\,faf \
  67. frontends/riscos/appdir/Resources/ja/welcome.html\,faf \
  68. frontends/riscos/appdir/Resources/nl/welcome.html\,faf
  69. sed -i 's|Google|DuckDuckGo HTML|
  70. ' frontends/amiga/dist/NetSurf.guide
  71. # patch and remove anything that's left
  72. patch -p1 -i ../remove_nonprivacy_options.patch
  73. # To remove some residual google instances
  74. sed -i 's|"Google|www.google.com|http://duckduckgo.com/html/?q=%s|http://www.google.com/favicon.ico|\n"|"DuckDuckGo HTML|www.duckduckgo.com|http://duckduckgo.com/html/?q=%s|http://www.duckduckgo.com/favicon.ico|\n"|g' desktop/searchweb.c
  75. sed -i 's|<form method="get" action="http://www\.google\.co\.uk/search">|<form method="get" action="https://html\.duckduckgo\.com/html/">|g' resources/en/welcome.html
  76. sed -i 's|<input type="submit" value="Google Search" name="btnG">|<input type="submit" value="DuckDuckGo HTML Search" name="btnG">|g' resources/en/welcome.html