#!/bin/sh

iterate()
{
	"$@" NF 71d2281f8262aaca41eb76a111cd63e7 lib/opera@@{SUFFIX}/liboperagtk.so
	"$@" NF 6a6267611eb05344ffde3d4a73a977bc lib/opera@@{SUFFIX}/liboperakde4.so
	"$@" NX aeed794df7f3a5d07e03733de428f552 lib/opera@@{SUFFIX}/opera@@{SUFFIX}
	"$@" NX 82ac98139dae82852e9eaf1452ec89f1 lib/opera@@{SUFFIX}/operaplugincleaner
	"$@" NX 5da168d30d64fa5b0f19417f1cde3c81 lib/opera@@{SUFFIX}/operapluginwrapper
	"$@" NF 0a8389b127c477aa2c55ee5d234473ca lib/opera@@{SUFFIX}/plugins/README
	"$@" PF 3555a0be840d98b449faf459b8900f93 share/applications/opera-browser@@{SUFFIX}.desktop
	"$@" PF c32d6b1cdaa99944767e83a59fe27b4d share/applications/opera-widget-installer@@{SUFFIX}.desktop
	"$@" PF bf9c8c97f9432e69936000fc9db64290 share/applications/opera-widget-manager@@{SUFFIX}.desktop
	"$@" NF 3214f080875748938ba060314b4f727d share/doc/opera@@{SUFFIX}/LGPL-2
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/doc/opera@@{SUFFIX}/LICENSE
	"$@" NF e86ae7a20a7bc688af75a10d628de734 share/icons/hicolor/128x128/apps/opera-browser@@{SUFFIX}.png
	"$@" NF a8364412e16fd47998b58733e5a17ce6 share/icons/hicolor/128x128/apps/opera-widget-manager@@{SUFFIX}.png
	"$@" NF e67a11f466869d45bda53bdc9dbf4820 share/icons/hicolor/128x128/mimetypes/opera-unite-application@@{SUFFIX}.png
	"$@" NF a2ae615b486e32092225f672d436d799 share/icons/hicolor/128x128/mimetypes/opera-widget@@{SUFFIX}.png
	"$@" NF c3a9608cefc210c9e7823389c880a846 share/icons/hicolor/16x16/apps/opera-browser@@{SUFFIX}.png
	"$@" NF 63786cc7701894e2ed1cecad31f2f78e share/icons/hicolor/16x16/apps/opera-widget-manager@@{SUFFIX}.png
	"$@" NF 87a4cd99f0b1be41a1f6cfda5d57858a share/icons/hicolor/16x16/mimetypes/opera-unite-application@@{SUFFIX}.png
	"$@" NF 2bf861fe626ecd8480ed4f4b1d4f6086 share/icons/hicolor/16x16/mimetypes/opera-widget@@{SUFFIX}.png
	"$@" NF 6ed751290abb1877dc5f63d98d519388 share/icons/hicolor/22x22/apps/opera-browser@@{SUFFIX}.png
	"$@" NF a385010faaf3f4474e179b3e31e7dc4c share/icons/hicolor/22x22/apps/opera-widget-manager@@{SUFFIX}.png
	"$@" NF 96f5a6bb62249a96b18a21e2620dcaf5 share/icons/hicolor/22x22/mimetypes/opera-unite-application@@{SUFFIX}.png
	"$@" NF a9c3ccc0b72ab3af8abd7e340e3c9918 share/icons/hicolor/22x22/mimetypes/opera-widget@@{SUFFIX}.png
	"$@" NF 69ec92d70839774813d2b947b64b6c47 share/icons/hicolor/24x24/apps/opera-browser@@{SUFFIX}.png
	"$@" NF 18da329a213cc3c61f44fe570d7fafe5 share/icons/hicolor/24x24/apps/opera-widget-manager@@{SUFFIX}.png
	"$@" NF 5de5a30096324d2fb9d48928d49912c3 share/icons/hicolor/24x24/mimetypes/opera-unite-application@@{SUFFIX}.png
	"$@" NF 8252fceede693440b96be35f6065cde3 share/icons/hicolor/32x32/apps/opera-browser@@{SUFFIX}.png
	"$@" NF 7d64048682c5ea906e7ea281f4f12442 share/icons/hicolor/32x32/apps/opera-widget-manager@@{SUFFIX}.png
	"$@" NF 7d861375334ea90d50f01bd84720f54e share/icons/hicolor/32x32/mimetypes/opera-unite-application@@{SUFFIX}.png
	"$@" NF 70b287cbe7a06465220692a15c9b9c13 share/icons/hicolor/32x32/mimetypes/opera-widget@@{SUFFIX}.png
	"$@" NF d0b315ea05750c1abb157042e56165d2 share/icons/hicolor/48x48/apps/opera-browser@@{SUFFIX}.png
	"$@" NF 6177835f1655a6a1441ebefe49f404ff share/icons/hicolor/48x48/apps/opera-widget-manager@@{SUFFIX}.png
	"$@" NF 4e4670e50dc2cb2305abd6f526a82099 share/icons/hicolor/48x48/mimetypes/opera-unite-application@@{SUFFIX}.png
	"$@" NF 6471746ab02f81f91b2e08fc95db4aa4 share/icons/hicolor/48x48/mimetypes/opera-widget@@{SUFFIX}.png
	"$@" NF 52440fbe31989de381a04002fe54da6e share/icons/hicolor/scalable/apps/opera-browser@@{SUFFIX}.svg
	"$@" NF 5a01f0263e5ad8efbc725a53652a0cc3 share/icons/hicolor/scalable/apps/opera-widget-manager@@{SUFFIX}.svg
	"$@" NF ce8e498331bac7751149b7012e5c39ee share/icons/hicolor/scalable/apps/opera-widget@@{SUFFIX}.svg
	"$@" NF 915c6ab08424fd6cc1fd1c9ffb0c576b share/icons/hicolor/scalable/mimetypes/opera-unite-application@@{SUFFIX}.svg
	"$@" PF c0bfd554ee0f3ee990306b9c860e677a share/man/man1/opera-widget-manager@@{SUFFIX}.1.gz
	"$@" PF 493a0f89bfec1aefc0c27d317650e2e5 share/man/man1/opera@@{SUFFIX}.1.gz
	"$@" PF 47369d7a10b56a444f3ff3cadfcfc68f share/mime/packages/opera-unite-application@@{SUFFIX}.xml
	"$@" PF 7744597b45c1ee17ad5e62adc5856a40 share/mime/packages/opera-widget@@{SUFFIX}.xml
	"$@" NF a63800871b1bab2b75c2adfba5617e57 share/opera@@{SUFFIX}/defaults/bookmarks.adr
	"$@" NF 8e0e1100c74de26e931201b212ccb289 share/opera@@{SUFFIX}/defaults/feedreaders.ini
	"$@" NF eff00befe1723a4742b9ae591170566c share/opera@@{SUFFIX}/defaults/filehandler.ini
	"$@" NF c8da3f671c192d7193d2c04e41586fea share/opera@@{SUFFIX}/defaults/font.ini
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/defaults/license.txt
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/defaults/license.txt
	"$@" NF 06d98e4cfb46c0a6884fd62b7b8c7196 share/opera@@{SUFFIX}/defaults/mailproviders.xml
	"$@" NF 546c775d915f020969e78e11ee101120 share/opera@@{SUFFIX}/defaults/pluginpath.ini
	"$@" NF 04c5466c3021c5348ff0b3bd91487774 share/opera@@{SUFFIX}/defaults/public_domains.dat
	"$@" NF 8a3d5b1a72b4c1b47a12f562c67a2370 share/opera@@{SUFFIX}/defaults/search.ini
	"$@" NF feced82cea0f55e9da2c0e789d4e33e4 share/opera@@{SUFFIX}/defaults/standard_speeddial.ini
	"$@" NF 999671790c0d7c13942128fc9acf7879 share/opera@@{SUFFIX}/defaults/standard_trusted_repositories.ini
	"$@" NF c98d21788ba4619a0a3bb41722142e45 share/opera@@{SUFFIX}/defaults/webmailproviders.ini
	"$@" NF e26f7b46dc49b8569ca6815d2d0ba1f4 share/opera@@{SUFFIX}/defaults/xmlentities.ini
	"$@" NF 9ce38cf66412831284ecdfc3bc5c82e9 share/opera@@{SUFFIX}/encoding.bin
	"$@" NF 54f1497ac9cc9ffa04d52213be260559 share/opera@@{SUFFIX}/extra/missingplugin.svg
	"$@" NF 17700f8a405a78dc1afdf69679a3f85b share/opera@@{SUFFIX}/extra/missingpluginhover.svg
	"$@" NF 0547d144b3de633887a8657de0ee1779 share/opera@@{SUFFIX}/extra/svg-mo.dat
	"$@" NF 6ee58550670e206dc93e1b31a7da2c9f share/opera@@{SUFFIX}/extra/svg-mobd.dat
	"$@" NF 0ab7eca84c071dac25dafd3b4569d80f share/opera@@{SUFFIX}/extra/svg-sa.dat
	"$@" NF 23059c42a43dceded9122d8834aa43fe share/opera@@{SUFFIX}/extra/svg-sabd.dat
	"$@" NF f3747a59108df781e04305b1bee29574 share/opera@@{SUFFIX}/extra/svg-se.dat
	"$@" NF bcdb530c010ed72fe6096d46366c57f5 share/opera@@{SUFFIX}/extra/svg-sebd.dat
	"$@" NF 7a2db2de5211ab16a6712e4168d17ec7 share/opera@@{SUFFIX}/html40_entities.dtd
	"$@" NF 87803f0514670b96c73d4043cd3568c8 share/opera@@{SUFFIX}/lngcode.txt
	"$@" NF 6073afe6b74625f762a3b2ae7d9d40e3 share/opera@@{SUFFIX}/locale/be/be.lng
	"$@" NF c32c583cf10893cd98230ab242978f41 share/opera@@{SUFFIX}/locale/be/bookmarks.adr
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/be/license.txt
	"$@" NF 11938edf4459514e4e5949ed9bf23278 share/opera@@{SUFFIX}/locale/be/search.ini
	"$@" NF f64fa511d028cfd28c7d3821fd5c3c38 share/opera@@{SUFFIX}/locale/be/standard_speeddial.ini
	"$@" NF 3bff9a5331c92574f646ed39d8fc247f share/opera@@{SUFFIX}/locale/bg/bg.lng
	"$@" NF a1de15106258be91ae802ad31ee75ee5 share/opera@@{SUFFIX}/locale/bg/bookmarks.adr
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/bg/license.txt
	"$@" NF 98b1509806e3c22fd5cb901d1b8705ff share/opera@@{SUFFIX}/locale/bg/search.ini
	"$@" NF 47f0c30e895ad5b1c722ec11c63fda7b share/opera@@{SUFFIX}/locale/bg/standard_speeddial.ini
	"$@" NF 06e1ec43ac21abd51f19b07f9f926aec share/opera@@{SUFFIX}/locale/cs/bookmarks.adr
	"$@" NF de2519ede7028c08f06a3a165734c567 share/opera@@{SUFFIX}/locale/cs/cs.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/cs/license.txt
	"$@" NF e5bf03cefd0272c45ba62008b886b6f8 share/opera@@{SUFFIX}/locale/cs/search.ini
	"$@" NF 47f0c30e895ad5b1c722ec11c63fda7b share/opera@@{SUFFIX}/locale/cs/standard_speeddial.ini
	"$@" NF 6fe8c1733e8614fe9e29dccfa1e83882 share/opera@@{SUFFIX}/locale/da/da.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/da/license.txt
	"$@" NF f1c5bc06f23c9fa71bdf04159370db69 share/opera@@{SUFFIX}/locale/de/bookmarks.adr
	"$@" NF a8bf0cc256d486f590938557f881fbe7 share/opera@@{SUFFIX}/locale/de/de.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/de/license.txt
	"$@" NF cb2c1b33ae6947583a6c03e34f1581b6 share/opera@@{SUFFIX}/locale/de/search.ini
	"$@" NF fcee1d98a79a0bd4911f6e5733fe8e85 share/opera@@{SUFFIX}/locale/de/standard_speeddial.ini
	"$@" NF e165147eeee561a3cebaf76103b71f8b share/opera@@{SUFFIX}/locale/el/el.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/el/license.txt
	"$@" NF 130c3709ece46d9aa8a80d25b8a0be5d share/opera@@{SUFFIX}/locale/en-GB/bookmarks.adr
	"$@" NF 5b29a2ac99ed8ed2fdb4399ffa105fc4 share/opera@@{SUFFIX}/locale/en-GB/en-GB.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/en-GB/license.txt
	"$@" NF b36764db2cf2eb8b79c77e413ef040d1 share/opera@@{SUFFIX}/locale/en-GB/search.ini
	"$@" NF 843057eb6c0b5c7d3f231d0978dc084b share/opera@@{SUFFIX}/locale/en-GB/standard_speeddial.ini
	"$@" NF 610f18d54d364205efe3bea7d8749efb share/opera@@{SUFFIX}/locale/en/bookmarks.adr
	"$@" NF ce156ca6dd7b346a84c0900097acce8a share/opera@@{SUFFIX}/locale/en/en.lng
	"$@" NF d4d0a0b6ae9a51b6a8a4bac72f6a2cc3 share/opera@@{SUFFIX}/locale/en/en.zip
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/en/license.txt
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/en/license.txt
	"$@" NF f484a80c8c74830c69866674031e95b3 share/opera@@{SUFFIX}/locale/en/search.ini
	"$@" NF 3b32f6c65c63de9a79e326560653ca9d share/opera@@{SUFFIX}/locale/en/standard_speeddial.ini
	"$@" NF 62707c9c525b70ef2a9ad1cf1b08d111 share/opera@@{SUFFIX}/locale/es-ES/bookmarks.adr
	"$@" NF 72b130b961cbcc8918f6d027fcca214f share/opera@@{SUFFIX}/locale/es-ES/es-ES.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/es-ES/license.txt
	"$@" NF 0ea66e022b52e8233b32646f71087ef2 share/opera@@{SUFFIX}/locale/es-ES/search.ini
	"$@" NF 17fc308ef07e8f8950d6aa7414d6603d share/opera@@{SUFFIX}/locale/es-ES/standard_speeddial.ini
	"$@" NF d5a37bc98157531fc6c45d2b04d7af91 share/opera@@{SUFFIX}/locale/es-LA/es-LA.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/es-LA/license.txt
	"$@" NF 9cc2c16e7f6ffa3a31c327412bdf4e86 share/opera@@{SUFFIX}/locale/et/et.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/et/license.txt
	"$@" NF 1c42983d04af5fa324dc8f126417cf07 share/opera@@{SUFFIX}/locale/fi/fi.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/fi/license.txt
	"$@" NF 1b4714e7d94271046f437af79c5d26fe share/opera@@{SUFFIX}/locale/fr-CA/fr-CA.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/fr-CA/license.txt
	"$@" NF a421ff0f5385fd1a13e47673492b626b share/opera@@{SUFFIX}/locale/fr/bookmarks.adr
	"$@" NF 69bd59779002b124468dcfbe618113c2 share/opera@@{SUFFIX}/locale/fr/fr.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/fr/license.txt
	"$@" NF fc9ae79dcd6f9c69a81e19cd9c67016e share/opera@@{SUFFIX}/locale/fr/search.ini
	"$@" NF 55b45dbdfad8f1cbe6f9fd6413d88161 share/opera@@{SUFFIX}/locale/fr/standard_speeddial.ini
	"$@" NF 020cf5fe48101e5e217734704573c053 share/opera@@{SUFFIX}/locale/fy/fy.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/fy/license.txt
	"$@" NF 9d43eb197ba10cf63b7c15e3cc6bff52 share/opera@@{SUFFIX}/locale/hi/hi.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/hi/license.txt
	"$@" NF bf130e8e52b5d7930c74f212483e4dc9 share/opera@@{SUFFIX}/locale/hr/hr.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/hr/license.txt
	"$@" NF 4e6c37f52b3126fbea7ede33408d09d8 share/opera@@{SUFFIX}/locale/hu/bookmarks.adr
	"$@" NF d621a58f6eddbd2dde1681283ef5a607 share/opera@@{SUFFIX}/locale/hu/hu.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/hu/license.txt
	"$@" NF e602357ed56ca7d1ac919583b5157e02 share/opera@@{SUFFIX}/locale/hu/search.ini
	"$@" NF 47f0c30e895ad5b1c722ec11c63fda7b share/opera@@{SUFFIX}/locale/hu/standard_speeddial.ini
	"$@" NF cd8eec433804ec36ea4e9def9eb339ce share/opera@@{SUFFIX}/locale/id/id.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/id/license.txt
	"$@" NF 7e4a83f3952f71e84b302391aeb52623 share/opera@@{SUFFIX}/locale/it/bookmarks.adr
	"$@" NF 304f3ec02235658c3d20d26740c8e323 share/opera@@{SUFFIX}/locale/it/it.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/it/license.txt
	"$@" NF 26fc18658bb275f6c90b9757f5da0ca0 share/opera@@{SUFFIX}/locale/it/search.ini
	"$@" NF 17fc308ef07e8f8950d6aa7414d6603d share/opera@@{SUFFIX}/locale/it/standard_speeddial.ini
	"$@" NF 8e47751fd616201a0b92c4f9d86b9f42 share/opera@@{SUFFIX}/locale/ja/bookmarks.adr
	"$@" NF d8d4e4fcb3937376083bc4c2e85d0d6b share/opera@@{SUFFIX}/locale/ja/ja.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/ja/license.txt
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/ja/license.txt
	"$@" NF bc2d154eab8134f8f424f757d5b8ed51 share/opera@@{SUFFIX}/locale/ja/search.ini
	"$@" NF e241ecfa93beebc6c7e13d3ff7088f2a share/opera@@{SUFFIX}/locale/ja/standard_speeddial.ini
	"$@" NF de1fae519adb1aff545ab9c5f1a718f4 share/opera@@{SUFFIX}/locale/ka/ka.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/ka/license.txt
	"$@" NF f17ebcc0edb8891423f3825e5c4afe37 share/opera@@{SUFFIX}/locale/ko/ko.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/ko/license.txt
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/lt/license.txt
	"$@" NF b282778ff739f79d52148c949e8e965d share/opera@@{SUFFIX}/locale/lt/lt.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/mk/license.txt
	"$@" NF 0c691c65c9ba7ba76b29e9c6c25a024b share/opera@@{SUFFIX}/locale/mk/mk.lng
	"$@" NF 1dc7c17861c8fcd8ee2f5ee1349c585b share/opera@@{SUFFIX}/locale/nb/bookmarks.adr
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/nb/license.txt
	"$@" NF 968421069a3cdcdc790b3912d4f12edb share/opera@@{SUFFIX}/locale/nb/nb.lng
	"$@" NF 6f0044986d6837281f8d9c2bbaa67cb8 share/opera@@{SUFFIX}/locale/nb/search.ini
	"$@" NF 153557d59e22b19e202eed34bc135486 share/opera@@{SUFFIX}/locale/nb/standard_speeddial.ini
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/nl/license.txt
	"$@" NF ea0f6f378664269ba926bd2ded9079c0 share/opera@@{SUFFIX}/locale/nl/nl.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/nn/license.txt
	"$@" NF 12f7332157de9f3ebab2b2510fd7d65d share/opera@@{SUFFIX}/locale/nn/nn.lng
	"$@" NF 78d83a181856dfb1b08ea031766804a1 share/opera@@{SUFFIX}/locale/pl/bookmarks.adr
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/pl/license.txt
	"$@" NF 5c244d0c11def3a21ca329e2bb693260 share/opera@@{SUFFIX}/locale/pl/pl.lng
	"$@" NF 0ac90bac9d2dc88fdfe61dc16d62a391 share/opera@@{SUFFIX}/locale/pl/search.ini
	"$@" NF dc3d1b2ea456dc60eeed0abcf4c35467 share/opera@@{SUFFIX}/locale/pl/standard_speeddial.ini
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/pt-BR/license.txt
	"$@" NF 0b6d6eb0641fc03de4b1b01ae7235ad3 share/opera@@{SUFFIX}/locale/pt-BR/pt-BR.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/pt/license.txt
	"$@" NF 6bda5f0e1cbe8e2b44a839bd4c946109 share/opera@@{SUFFIX}/locale/pt/pt.lng
	"$@" NF 94ce13ff82285b944a65e079ba1e6bab share/opera@@{SUFFIX}/locale/ro/bookmarks.adr
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/ro/license.txt
	"$@" NF 9df76a145277dea6e9fd7a30586b82c0 share/opera@@{SUFFIX}/locale/ro/ro.lng
	"$@" NF 90c00091f85ee0bb3d02c7c034b63767 share/opera@@{SUFFIX}/locale/ro/search.ini
	"$@" NF 47f0c30e895ad5b1c722ec11c63fda7b share/opera@@{SUFFIX}/locale/ro/standard_speeddial.ini
	"$@" NF e8ee48c4ddae5768033e84af4d10368a share/opera@@{SUFFIX}/locale/ru/bookmarks.adr
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/ru/license.txt
	"$@" NF fc011f739f46ef795eb0a7dbb70df0dc share/opera@@{SUFFIX}/locale/ru/ru.lng
	"$@" NF a0ba124fcf84fb5dbb8ac820707d640d share/opera@@{SUFFIX}/locale/ru/search.ini
	"$@" NF f64fa511d028cfd28c7d3821fd5c3c38 share/opera@@{SUFFIX}/locale/ru/standard_speeddial.ini
	"$@" NF 9a9d595227f4a7d448ed283388d2018a share/opera@@{SUFFIX}/locale/sk/bookmarks.adr
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/sk/license.txt
	"$@" NF 9741b581668a0a5ac7b9e97da65d1b38 share/opera@@{SUFFIX}/locale/sk/search.ini
	"$@" NF 2b01d52c251d282c2ec5295697eb47ef share/opera@@{SUFFIX}/locale/sk/sk.lng
	"$@" NF 47f0c30e895ad5b1c722ec11c63fda7b share/opera@@{SUFFIX}/locale/sk/standard_speeddial.ini
	"$@" NF ac3e26aa414cdbc26568b59d7b65380a share/opera@@{SUFFIX}/locale/sr/bookmarks.adr
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/sr/license.txt
	"$@" NF 74b99e3c5b951912737f418621fb42ad share/opera@@{SUFFIX}/locale/sr/search.ini
	"$@" NF df551d7b1aa04b1c13d65bdee65262b2 share/opera@@{SUFFIX}/locale/sr/sr.lng
	"$@" NF 47f0c30e895ad5b1c722ec11c63fda7b share/opera@@{SUFFIX}/locale/sr/standard_speeddial.ini
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/sv/license.txt
	"$@" NF cb3e4cf1d2ea3b17eb389e3ee7dfbb7b share/opera@@{SUFFIX}/locale/sv/sv.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/ta/license.txt
	"$@" NF 09d1e74decaa329d405f064f213637c9 share/opera@@{SUFFIX}/locale/ta/ta.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/te/license.txt
	"$@" NF ab3d422810f40837fc4bf15661f5fff2 share/opera@@{SUFFIX}/locale/te/te.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/tr/license.txt
	"$@" NF b2d551fd0604fe17bd0cafeb9336c458 share/opera@@{SUFFIX}/locale/tr/tr.lng
	"$@" NF c1f0cd5f8b54d001bae755df048412c4 share/opera@@{SUFFIX}/locale/uk/bookmarks.adr
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/uk/license.txt
	"$@" NF 0b3e57b98e39c74095b77b838308d0c7 share/opera@@{SUFFIX}/locale/uk/search.ini
	"$@" NF f64fa511d028cfd28c7d3821fd5c3c38 share/opera@@{SUFFIX}/locale/uk/standard_speeddial.ini
	"$@" NF c073a539b016b72784f50ca78e8eda3d share/opera@@{SUFFIX}/locale/uk/uk.lng
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/vi/license.txt
	"$@" NF f7e2df2b009ffbbb647ddc34c28bc372 share/opera@@{SUFFIX}/locale/vi/vi.lng
	"$@" NF 88b0924c694e95668249321885cb6827 share/opera@@{SUFFIX}/locale/zh-cn/bookmarks.adr
	"$@" NF 62b4967518c5024a51a3d6851973a651 share/opera@@{SUFFIX}/locale/zh-cn/browser.js
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/zh-cn/license.txt
	"$@" NF 4ec72295b62bd7b185079c7a16020005 share/opera@@{SUFFIX}/locale/zh-cn/search.ini
	"$@" NF 83dd1223eaa74c448d1d2404f7d53b96 share/opera@@{SUFFIX}/locale/zh-cn/standard_speeddial.ini
	"$@" NF d44fc31b4c96a97d22624455874764ca share/opera@@{SUFFIX}/locale/zh-cn/turbosettings.xml
	"$@" NF 6b16a128c298c5bb0ba2f816e0087cfc share/opera@@{SUFFIX}/locale/zh-cn/zh-cn.lng
	"$@" NF 62b4967518c5024a51a3d6851973a651 share/opera@@{SUFFIX}/locale/zh-hk/browser.js
	"$@" NF 6ea2f98cdeaf54c398dca24aea9df644 share/opera@@{SUFFIX}/locale/zh-hk/turbosettings.xml
	"$@" NF 62b4967518c5024a51a3d6851973a651 share/opera@@{SUFFIX}/locale/zh-tw/browser.js
	"$@" NF 9143090066bf153b8d0537bc4ed81905 share/opera@@{SUFFIX}/locale/zh-tw/license.txt
	"$@" NF 6ea2f98cdeaf54c398dca24aea9df644 share/opera@@{SUFFIX}/locale/zh-tw/turbosettings.xml
	"$@" NF 0db9fedfba2ead9279a967b491d1ac98 share/opera@@{SUFFIX}/locale/zh-tw/zh-tw.lng
	"$@" NF b5698c52d03e7e6aa08b3a8e1a754926 share/opera@@{SUFFIX}/package-id.ini
	"$@" NF a6485d9b7be876314c624d291d6575a1 share/opera@@{SUFFIX}/package/lib/binprint.sh
	"$@" NF e7e881f582f55beb206ee28c694a9a1c share/opera@@{SUFFIX}/package/lib/layout_common.sh
	"$@" NF 45642baaad2a785da620edf0945690ff share/opera@@{SUFFIX}/package/lib/layout_deb.sh
	"$@" NF ef97aabff0bf409a1b8869d34668d727 share/opera@@{SUFFIX}/package/lib/layout_tar.sh
	"$@" NF a8282806a1e3b9bea0f279348f76d4c2 share/opera@@{SUFFIX}/package/lib/main.sh
	"$@" NF 5843ecaae9aad7e1e0f36bc0d245df45 share/opera@@{SUFFIX}/package/lib/normalize.sh
	"$@" NF 324d47f2b5cf6e64fc7b548883527d5f share/opera@@{SUFFIX}/package/lib/package_deb.sh
	"$@" NF f809760b9a5cce32e0dd95e0fd39eb36 share/opera@@{SUFFIX}/package/lib/package_rpm.sh
	"$@" NF 23a7c89f979f1ebaa19d686215419cb7 share/opera@@{SUFFIX}/package/lib/package_tar.sh
	"$@" NF b2a6eb60c20b9329acad9f519ca66ac0 share/opera@@{SUFFIX}/package/lib/xml.sh
	"$@" NX bca998e6f24510a22be340fea94f81f0 share/opera@@{SUFFIX}/package/main.sh
	"$@" NF 0c050f9768e56d2218725b9e4a4dec7c share/opera@@{SUFFIX}/skin/standard_skin.zip
	"$@" NF d7ae0eb2e1676c88ccdbd0ef46d715f3 share/opera@@{SUFFIX}/skin/unix_skin.zip
	"$@" NF 06820e6bdd581b0a257e5e2648360457 share/opera@@{SUFFIX}/styles/about.css
	"$@" NF 4fb7c857524fd084449266fc70e9288b share/opera@@{SUFFIX}/styles/cache.css
	"$@" NF 2ec9302ae4f0d9062ca15a885269ead6 share/opera@@{SUFFIX}/styles/certinfo.css
	"$@" NF 2d48ba14700b13d0024d4188241a4758 share/opera@@{SUFFIX}/styles/config.css
	"$@" NF adc83d14afaa0ea76588cf340e36c3a5 share/opera@@{SUFFIX}/styles/contentblock.css
	"$@" NF 3ddaf96398ae99245f6b83e6dc676ac6 share/opera@@{SUFFIX}/styles/debug.css
	"$@" NF 056873687942e8aad4f0f297c1d4a57b share/opera@@{SUFFIX}/styles/dir.css
	"$@" NF fb8d712239bbe69e40c6c213f4fb47a2 share/opera@@{SUFFIX}/styles/error.css
	"$@" NF e9ee42b5c66c0367c1e02a1eeeca0776 share/opera@@{SUFFIX}/styles/history.css
	"$@" NF 3313969be29b130922a2551034194d42 share/opera@@{SUFFIX}/styles/im.css
	"$@" NF c8723eaa9387b79cf23f8f49c8bdb5b3 share/opera@@{SUFFIX}/styles/image.css
	"$@" NF 73b840d67b16a49008b7ed3d6aec38ab share/opera@@{SUFFIX}/styles/images/Opera_256x256.png
	"$@" NF 35a8968b802c4cd66f70631354cec397 share/opera@@{SUFFIX}/styles/images/bar.png
	"$@" NF b133b79753e118bafa077c594ed22724 share/opera@@{SUFFIX}/styles/images/bkgd.png
	"$@" NF 4289d8db3e0ad4cb825d34c969c142ff share/opera@@{SUFFIX}/styles/images/bullet.png
	"$@" NF cbdbb7032558dae6b04f7691c4b8a41a share/opera@@{SUFFIX}/styles/images/center.png
	"$@" NF f23a4e2a5c1a0db7cfac79d1e7b9ba23 share/opera@@{SUFFIX}/styles/images/corner.png
	"$@" NF b423f4149c868ccf56a15abb83228f09 share/opera@@{SUFFIX}/styles/images/customize.gif
	"$@" NF e715da6d7e5314261bdff2942251718a share/opera@@{SUFFIX}/styles/images/darkBox.png
	"$@" NF 0dfc37ae4404b4a6811e4876db6b7df1 share/opera@@{SUFFIX}/styles/images/defaultFavicon.png
	"$@" NF 71bbdb354d7e65183c86aa36a27ddd1d share/opera@@{SUFFIX}/styles/images/error.png
	"$@" NF ac4455a870ed9d5365377c2d9566240c share/opera@@{SUFFIX}/styles/images/file.png
	"$@" NF 86c6ac920bd2fbb7f538ff79d4e34395 share/opera@@{SUFFIX}/styles/images/flag.png
	"$@" NF c6ee6872a8d70dbec976edd11bdaf986 share/opera@@{SUFFIX}/styles/images/folder.png
	"$@" NF 4412303b131452fd536e794e93bdc8f5 share/opera@@{SUFFIX}/styles/images/hanger.png
	"$@" NF cd587bbd0135bcc9820de23318dbae41 share/opera@@{SUFFIX}/styles/images/header-expanded.png
	"$@" NF 533450be6ceff816d25c53fb8ca93cad share/opera@@{SUFFIX}/styles/images/header.png
	"$@" NF 0c313c9e4b635e06cc9fa61b734ad99b share/opera@@{SUFFIX}/styles/images/opera-icon-red.png
	"$@" NF bfdd24b5079de6de555f5477256a8ed3 share/opera@@{SUFFIX}/styles/images/opera-icon-white.png
	"$@" NF a2ed905f3862c320bb43e866721729d7 share/opera@@{SUFFIX}/styles/images/opera.png
	"$@" NF dbb6d41150a244186500718eda971047 share/opera@@{SUFFIX}/styles/images/page-bot.png
	"$@" NF d58ef56a726e38bb51da5adf696153fc share/opera@@{SUFFIX}/styles/images/red_center.png
	"$@" NF 3c6c895d2519efa918b4b3f46a897b67 share/opera@@{SUFFIX}/styles/images/red_left.png
	"$@" NF a28ba91c09ea75605d727e9bde7771b1 share/opera@@{SUFFIX}/styles/images/red_right.png
	"$@" NF a0c5f8a66f4e25f5d16ca1696a8f2e03 share/opera@@{SUFFIX}/styles/images/root.png
	"$@" NF 4aecd261352501fa1bad2c5e608df556 share/opera@@{SUFFIX}/styles/images/search.png
	"$@" NF b641cb9df6a4065ec64e6aac43cd5bc8 share/opera@@{SUFFIX}/styles/images/section.png
	"$@" NF 62f6287d95fafa0a8c56287e41760f33 share/opera@@{SUFFIX}/styles/images/smartGroup.png
	"$@" NF 2dab1572b02772c7a4fea3b5d51d1c48 share/opera@@{SUFFIX}/styles/images/tooltiptail.png
	"$@" NF f4dbc8a7b78e98448ad509bedca371c1 share/opera@@{SUFFIX}/styles/images/top.png
	"$@" NF 074b5a2c5386b6f2d12d172aa2f349fa share/opera@@{SUFFIX}/styles/images/warning.png
	"$@" NF fb7897053fcb415e726c0b3ae1731749 share/opera@@{SUFFIX}/styles/info.css
	"$@" NF e521ce4a0e2ad947af55f2fec3e30aee share/opera@@{SUFFIX}/styles/m2_welcome_message.mbs
	"$@" NF 174c0ece627639181db1815bff4f2f06 share/opera@@{SUFFIX}/styles/mail.css
	"$@" NF c92ea7dc91d7147ae4c5f51be8e9bf1e share/opera@@{SUFFIX}/styles/mathml.css
	"$@" NF e7dd3d81e0088d5fb56df880226cc7e1 share/opera@@{SUFFIX}/styles/message.css
	"$@" NF 3750093c67f26b7815262956cc5c5652 share/opera@@{SUFFIX}/styles/mime.css
	"$@" NF 6ea7648ab9ed035303fb59d65d74ac22 share/opera@@{SUFFIX}/styles/opera.css
	"$@" NF 11bc76ab5a9b24026eaf47499235d50b share/opera@@{SUFFIX}/styles/plugins.css
	"$@" NF 4f25b1757ad75536fd6811254e7e4e64 share/opera@@{SUFFIX}/styles/private.css
	"$@" NF c9eb684c5cb7e08d7aa56b4eeb5d335b share/opera@@{SUFFIX}/styles/search.css
	"$@" NF 4a1307a5ef44ce6f2699910d68353aaf share/opera@@{SUFFIX}/styles/unstyledxml.css
	"$@" NF 5bc0a8abcf1f533070d01415ecd7ad18 share/opera@@{SUFFIX}/styles/user/accessibility.css
	"$@" NF 0543fa1f23163fda70da1abca48ab27b share/opera@@{SUFFIX}/styles/user/altdebugger.css
	"$@" NF 83c445d3d83311a72e2b20ae3bcc31d2 share/opera@@{SUFFIX}/styles/user/classid.css
	"$@" NF 2fa6fc6187625a9b18f593bc0155347d share/opera@@{SUFFIX}/styles/user/contrastbw.css
	"$@" NF 3b14649c488639ccb271f4062fdbdbc3 share/opera@@{SUFFIX}/styles/user/contrastwb.css
	"$@" NF 768fce2463be25592a7a18cf5de76dd5 share/opera@@{SUFFIX}/styles/user/disablebreaks.css
	"$@" NF df59e1efbfe9e9e693007379ae36c7c7 share/opera@@{SUFFIX}/styles/user/disablefloats.css
	"$@" NF b219720e32060eae7275b10f89822044 share/opera@@{SUFFIX}/styles/user/disableforms.css
	"$@" NF ff377988948f88b59d786eb4b4f5f6bd share/opera@@{SUFFIX}/styles/user/disablepositioning.css
	"$@" NF a282ab27760ce5c9d08e5d19e3679f45 share/opera@@{SUFFIX}/styles/user/disabletables.css
	"$@" NF a89f5a95b9d93f02a5710a015e0eb1fa share/opera@@{SUFFIX}/styles/user/outline.css
	"$@" NF 1641b9745dcd076b4850bc79a5e3a745 share/opera@@{SUFFIX}/styles/user/structureblock.css
	"$@" NF 04db12198eb3e12f3fdb9818aff46cd7 share/opera@@{SUFFIX}/styles/user/structureinline.css
	"$@" NF b32564a2bc51123644e04b434c70d24b share/opera@@{SUFFIX}/styles/user/structuretables.css
	"$@" NF 76eadfb729094d536d2313e62ec5f02b share/opera@@{SUFFIX}/styles/user/tablelayout.css
	"$@" NF 0247352ff07de9a6f4a9ea9661fe54a9 share/opera@@{SUFFIX}/styles/user/toc.css
	"$@" NF 0416c2b6feca0d75749c0f1799fbe12b share/opera@@{SUFFIX}/styles/warning.css
	"$@" NF 5d9184651dd41df3b071ee75928338f5 share/opera@@{SUFFIX}/styles/webfeeds.html
	"$@" NF 9edd8f497d3202b7e6d7a9c6e6b98bf8 share/opera@@{SUFFIX}/styles/webstorage.css
	"$@" NF ff04b782043ab4c4b1b0d4114901af21 share/opera@@{SUFFIX}/styles/wml.css
	"$@" NF 3ae94968550bd28ae7fe05c3fcc8b90b share/opera@@{SUFFIX}/ui/dialog.ini
	"$@" NF e6d9e74c12773dcf0d6a195b6b9e78ac share/opera@@{SUFFIX}/ui/fastforward.ini
	"$@" NF 2618d30f6c18c8f6ca206ec485ab0228 share/opera@@{SUFFIX}/ui/standard_keyboard.ini
	"$@" NF f9382758f2d97867e0aa24108e23b6ee share/opera@@{SUFFIX}/ui/standard_keyboard_compat.ini
	"$@" NF 105cfa0c69bd2fe9a4d2d2958a37ec80 share/opera@@{SUFFIX}/ui/standard_menu.ini
	"$@" NF 9ecf2b12a156d17499f8eda5dd962842 share/opera@@{SUFFIX}/ui/standard_mouse.ini
	"$@" NF 41f56b0262b4b3450f940c274280735a share/opera@@{SUFFIX}/ui/standard_toolbar.ini
	"$@" NF d8c1daa6b518364bbcdf0afbc99891bc share/opera@@{SUFFIX}/ui/unix_keyboard.ini
	"$@" NF 1db8c0e514a6ae958e9bb700c4b07248 share/opera@@{SUFFIX}/unite/fileSharing.ua
	"$@" NF 4fc96fda4e77baef3aa456a2a9fe3350 share/opera@@{SUFFIX}/unite/fridge.ua
	"$@" NF c9aede12b8c4970a483102f8533f579c share/opera@@{SUFFIX}/unite/home.ua
	"$@" NF 2546baa6e55b09a22c4dff6e58c689dc share/opera@@{SUFFIX}/unite/mediaPlayer.ua
	"$@" NF fea93e30768e6380bda927f9d232b6f8 share/opera@@{SUFFIX}/unite/messenger.ua
	"$@" NF 3bc8feb5dad829ad7edd8721cf09b2dc share/opera@@{SUFFIX}/unite/photoSharing.ua
	"$@" NF ba8e7ba2633ccdc0f7e2185c88ec86dc share/opera@@{SUFFIX}/unite/webserver.ua
	"$@" GX - bin/opera@@{SUFFIX}
	"$@" GX - bin/opera-widget-manager@@{SUFFIX}
	"$@" GX - bin/uninstall-opera@@{SUFFIX}
}

available()
{
	which "$1" >/dev/null 2>&1
}

finalize_xdg()
{
	if available update-desktop-database
	then
		update-desktop-database $PREFIX/share/applications
	fi
	if available update-mime-database
	then
		mkdir -p $PREFIX/share/mime/packages
		update-mime-database $PREFIX/share/mime
		rmdir $PREFIX/share/mime/packages >/dev/null 2>&1
	fi
}

make_tempdir()
{
	if [ -z "$tempdir" ]
	then
		tempdir=$(mktemp -d -t opera-install.XXXXXXXX)
		if [ $? != 0 ]
		then
			ui_error "Cannot create a temporary directory, please set TMPDIR correctly"
		fi
	fi
}

cleanup()
{
	res=$?
	trap - 0
	if [ $res -gt 0 ] && $need_rollback
	then
		rollback
	fi
	if $need_ui_cleanup
	then
		ui_cleanup
	fi
	if [ -n "$tempdir" ]
	then
		rm -rf $tempdir
	fi
	exit $res
}

ui_widget()
{
	local width height
	message=$(
		echo "$2"
		if [ -n "$3" ]
		then
			echo
			cat "$3"
		fi
		if [ -n "$4" ]
		then
			echo
			echo "$4"
		fi
	)
	case $driver in
		dialog|whiptail)
			width=72
			if available fmt
			then
				message=$(echo "$message" | fmt -w $((width - 4)))
				height=$(($(echo "$message" | wc -l) + 6))
				if [ $1 = inputbox ]
				then
					height=$((height + 2))
				fi
			else
				height=20
			fi
			;;
	esac
	need_ui_cleanup=true
	case $driver in
		dialog|whiptail)
			exec 4>&1
			answer=$($driver --title "$windowtitle" --clear --$1 "$message" $height $width 2>&1 1>&4)
			res=$?
			exec 4>&-
			;;
		plain)
			echo
			echo "$message"
			case $1 in
				yesno)
					while true
					do
						read -p 'Please enter Y or N: ' answer
						case "$answer" in
							y*|Y*)
								res=0
								break
								;;
							n*|N*)
								res=1
								break
								;;
						esac
					done
					;;
				inputbox)
					read -p '>' answer
					;;
				msgbox|infobox)
					res=0
					;;
			esac
			;;
	esac
	need_ui_cleanup=false
	return $res
}

ui_info()
{
	ui_widget infobox "$@"
}

ui_message()
{
	ui_widget msgbox "$@"
}

ui_warn()
{
	ui_widget yesno "$1" "$2" 'Continue?' || exit
}

ui_error()
{
	ui_widget msgbox "$1" "$2" 'Installation aborted.'
	exit 1
}

ui_input()
{
	ui_widget inputbox "$1" "$2" ''
}

ui_menu()
{
	local text width height
	case $driver in
		dialog|whiptail)
			width=72
			if available fmt
			then
				height=$(($(echo "$text" | fmt -w $((width - 4)) | wc -l) + $# / 2 + 8))
			else
				height=20
			fi
			;;
	esac
	need_ui_cleanup=true
	case $driver in
		dialog|whiptail)
			text=$1
			shift
			exec 4>&1
			answer=$($driver --menu "$text" $height $width $(($# / 2)) "$@" 2>&1 1>&4) || exit
			res=$?
			exec 4>&-
			;;
		plain)
			echo
			echo "$1"
			shift
			(
				n=1
				while [ -n "$1" ]
				do
					echo "[$n] $2"
					n=$((n + 1))
					shift 2
				done
			)
			while true
			do
				read -p "Your choice: " answer
				if echo "$answer" | grep -q '^[0-9][0-9]*$' && [ $((answer >= 1)) = 1 ] && [ $((answer <= $# / 2)) = 1 ]
				then
					break
				fi
				echo "Please enter an integer between 1 and $(($# / 2))."
			done
			shift $((answer * 2 - 2))
			answer="$1"
			res=0
			;;
	esac
	need_ui_cleanup=false
	return $res
}

ui_progress_begin()
{
	if ! $talk
	then
		return
	fi
	if [ -z "$progress_max" ]
	then
		progress_max=$(iterate echo | wc -l)
	fi
	progress_cur=0
	need_ui_cleanup=true
	case $driver in
		whiptail)
			make_tempdir
			mkfifo $tempdir/gauge
			whiptail --gauge "$1" 0 72 0 <$tempdir/gauge &
			exec 3>$tempdir/gauge
			;;
		*)
			echo
			echo -n "$1"
			;;
	esac
}

ui_progress_advance()
{
	if ! $talk
	then
		return
	fi
	progress_cur=$((progress_cur + 1))
	case $driver in
		whiptail)
			echo $((progress_cur * 100 / progress_max)) >&3
			;;
		*)
			echo -n '.'
			;;
	esac
}

ui_progress_end()
{
	if ! $talk
	then
		return
	fi
	case $driver in
		whiptail)
			exec 3>&-
			rm $tempdir/gauge
			;;
		*)
			echo 'done'
			;;
	esac
	need_ui_cleanup=false
}

ui_cleanup()
{
	case $driver in
		dialog)
			exec 4>&-
			dialog --clear
			stty sane
			clear
			;;
		whiptail)
			exec 3>&- 4>&-
			stty sane
			clear
			;;
		plain)
			echo
			;;
	esac
}

ui_init()
{
	if [ -z "$TERM" -o "$TERM" = dumb ]
	then
		driver=plain
	elif available whiptail
	then
		driver=whiptail
	elif available dialog
	then
		driver=dialog
	else
		driver=plain
	fi
	answer=''
	progress_max=''
	windowtitle="$1"
}

common_init()
{
	interactive=true
	talk=true
	force=false
	need_rollback=false
	need_ui_cleanup=false
	tempdir=''

	trap cleanup 0 INT QUIT TERM
}

common_opt()
{
	case "$1" in
		--text)
			driver=plain
			;;
		--unattended)
			interactive=false
			driver=plain
			;;
		--quiet)
			talk=false
			interactive=false
			driver=plain
			;;
		--force)
			force=true
			;;
		*)
			return 1
	esac
}

# EOF_COMMON

version()
{
	ui_message "This script installs Opera 10.53 build 6330 for FreeBSD 7.x, 8.x on amd64.

Copyright (c) 1995-2010 Opera Software ASA. All rights reserved."
}

usage()
{
	version
	cat <<EOF

Options:
    --text          Select plaintext user interface
    --unattended    Ask no questions
    --quiet         Ask no questions and don't show progress (implies --text)
    --user          Install for the current user (into ~/.local)
    --system        Install for everybody (into /usr/local)
    --suffix S      Append S to the names of installed files and directories
    --force         Ignore all kinds of errors and try to continue
    --version       Show Opera version
    --help          Show this message
EOF
}

check_os()
{
	local name version arch res msg
	res=false
	name=$(uname -s)
	case "$name" in
		Linux)
			;;
		*BSD)
			name="$name $(uname -r)"
			case "$name" in
				FreeBSD\ [78].*)
					res=true
					;;
			esac
			;;
	esac
	arch=$(uname -m)
	case "$arch" in
		i?86|i86pc)
			arch=i386
			;;
		x86_64)
			arch=amd64
			;;
		ppc|ppc64)
			arch=powerpc
			;;
	esac
	if [ "$arch" != amd64 ]
	then
		res=false
	fi
	if ! $res
	then
		msg="You are running $name on $arch, but this package is intended for FreeBSD 7.x, 8.x on amd64. If you choose to install it, the product may not work correctly."
		if $interactive
		then
			ui_warn "$msg"
		else
			ui_error "$msg"
		fi
	fi
}


install_file()
{
	local source dest existing tomake
	if [ -f $tempdir/damaged ] && ! $force
	then
		return 1
	fi
	source=$(use_suffix '' "$3")
	dest=$PREFIX/$(use_suffix "$SUFFIX" "$3")
	existing=$dest
	tomake=''
	while [ -n "$existing" -a ! -e "$existing" ]
	do
		tomake=$existing
		existing=${existing%/*}
	done
	if [ ! -d "$existing" -o "$dest" = "$existing" ]
	then
		if { rm -rf "$existing~" && mv "$existing" "$existing~"; } 2>$tempdir/error || $force
		then
			echo "mv '$existing~' '$existing'" >>$tempdir/rollback
			echo "rm -rf '$existing~'" >>$tempdir/commit
		else
			ui_error "Cannot make a backup copy of $existing -- see detailed error message below." $tempdir/error
			echo "$dest">>$tempdir/damaged
			return 1
		fi
	elif [ -n "$tomake" -a "$tomake" != "$dest" ]
	then
		if mkdir -p "${dest%/*}" 2>$tempdir/error || $force
		then
			echo "rm -rf '$tomake'" >>$tempdir/rollback
		else
			ui_error "Cannot create directory ${dest%/*} -- see detailed error message below." $tempdir/error
			echo "$dest">>$tempdir/damaged
			return 1
		fi
	fi
	case "$1" in
		N?)
			cp "$source" "$dest"
			;;
		P?)
			case "$dest" in
				*.gz)
					gzip -dc "$source" | process >"${dest%.gz}" && gzip -9 "${dest%.gz}"
					;;
				*)
					process <"$source" >"$dest"
					;;
			esac
			;;
		G?)
			generate_file "${source##*/}" | process >"$dest"
			;;
	esac 2>$tempdir/error || $force || {
		ui_error "Cannot install $dest -- see detailed error message below." $tempdir/error
		echo "$dest">>$tempdir/damaged
		return 1
	}
	case "$1" in
		?F)
			chmod 0644 "$dest"
			;;
		?X)
			chmod 0755 "$dest"
			;;
	esac 2>$tempdir/error || $force || {
		ui_error "Cannot install $dest -- see detailed error message below." $tempdir/error
		echo "$dest">>$tempdir/damaged
		return 1
	}
	ui_progress_advance
}

generate_file()
{
	case "$1" in
		opera)
			cat <<'EOF_generate_file'
#!/bin/sh
export OPERA_DIR=${OPERA_DIR:-@@{PREFIX}/share/opera@@{SUFFIX}}
export OPERA_PERSONALDIR=${OPERA_PERSONALDIR:-$HOME/.opera@@{SUFFIX}}
exec @@{PREFIX}/lib/opera@@{SUFFIX}/opera@@{SUFFIX} "$@"
EOF_generate_file
			;;
		opera-widget-manager)
			cat <<'EOF_generate_file'
#!/bin/sh
exec @@{PREFIX}/bin/opera@@{SUFFIX} --widgetmanager "$@"
EOF_generate_file
			;;
		uninstall-opera)
			sed -ne '1,/EOF_COMMON/p' "${0##*/}"
			cat <<EOF
INSTALLMODE='$INSTALLMODE'
PREFIX='$PREFIX'
SUFFIX='$SUFFIX'
EOF
			cat <<'EOF_generate_file'

usage()
{
	version
	cat <<EOF

Options:
    --text          Select plaintext user interface
    --unattended    Ask no questions
    --quiet         Ask no questions and don't show progress (implies --text)
    --force         Ignore all kinds of errors and try to continue
    --help          Show this message
EOF
}

uninstall_file()
{
	if $upgrade_mode
	then
		mv "$PREFIX/$3" "$PREFIX/$3~"
		echo "mv '$PREFIX/$3~' '$PREFIX/$3'" >>$install_tempdir/rollback
		echo "rm -f '$PREFIX/$3~'; rmdir -p '$PREFIX/${3##*/}' 2>/dev/null" >>$install_tempdir/commit
	else
		rm -f "$PREFIX/$3"
		rmdir -p "$PREFIX/${3%/*}" 2>/dev/null
	fi
	ui_progress_advance
}

common_init
ui_init 'Uninstalling Opera'

upgrade_mode=false

while [ -n "$1" ]
do
	common_opt "$1" || case "$1" in
		--upgrade)
			shift
			upgrade_mode=true
			talk=false
			interactive=false
			driver=plain
			force=true
			install_tempdir="$1"
			;;
		*)
			driver=plain
			usage
			exit
			;;
	esac
	shift
done

if $talk
then
	msg="This script uninstalls Opera 10.53 build 6330 for FreeBSD 7.x, 8.x on amd64 installed as $PREFIX/bin/opera$SUFFIX."
	if $interactive
	then
		ui_warn "$msg"
	else
		ui_message "$msg"
	fi
fi

if [ $INSTALLMODE = system -a ! -w /usr/local ] && ! $force
then
	ui_error "You must be root to uninstall software installed system-wide."
fi

ui_progress_begin "Removing files"
iterate uninstall_file
ui_progress_end

if ! $upgrade_mode
then
	if $talk
	then
		ui_info "Finalizing uninstallation..."
	fi
	finalize_xdg
fi

if $talk
then
	case $INSTALLMODE in
		user)
			ui_message "Opera has been uninstalled successfully. However, your profile directory, which is by default ~/.opera$SUFFIX, has been left intact. You might want to delete it manually."
			;;
		system)
			ui_message "Opera has been uninstalled successfully. However, users' profile directories, which are by default ~/.opera$SUFFIX, have been left intact. You might want to delete them manually."
			;;
	esac
fi
EOF_generate_file
			;;
		*)
			return 1
	esac
}

rollback()
{
	ui_progress_begin "Undoing installation"
	iterate rollback_file
	ui_progress_end
	if [ -f $tempdir/rollback ]
	then
		. $tempdir/rollback
	fi
}

rollback_file()
{
	local dest
	dest=$PREFIX/$(use_suffix "$SUFFIX" "$3")
	rm -f "$dest"
	while [ -n "$dest" ]
	do
		dest=${dest%/*}
		case "$dest" in
			$PREFIX/*/opera*)
				rmdir "$dest" 2>/dev/null || break
				;;
		esac
	done
	ui_progress_advance
}

verify_file()
{
	local md5 file
	md5="$2"
	file=$(use_suffix '' "$3")
	case "$1" in
		G?)
			return
			;;
	esac
	if [ ! -f "$file" ]
	then
		make_tempdir
		echo "$file" >>$tempdir/damaged
	elif [ -n "$md5prog" ]
	then
		if [ $(get_md5 "$file") != "$md5" ]
		then
			echo "$file" >>$tempdir/damaged
		fi
	fi
	ui_progress_advance
}

get_md5()
{
	if [ "$md5prog" = md5 ]
	then
		md5 -q "$1"
	else
		md5sum "$1" | { read sum file; echo $sum; }
	fi
}

use_suffix()
{
	echo "$2" | sed -e "s:@@{SUFFIX}:$1:g"
}

process()
{
	sed -e "s:@@{PREFIX}:$PREFIX:g;s:@@{SUFFIX}:$SUFFIX:g;s:@@{_SUFFIX}:$_SUFFIX:g;s:@@{USUFFIX}:$USUFFIX:g"
}

INSTALLMODE=''
SUFFIX=''
_SUFFIX=''
USUFFIX=''

cd "${0%/*}"

common_init
ui_init 'Installing Opera'

if available md5
then
	md5prog=md5
elif available md5sum
then
	md5prog=md5sum
else
	md5prog=''
fi

while [ -n "$1" ]
do
	common_opt "$1" || case "$1" in
		--user)
			INSTALLMODE=user
			;;
		--system)
			INSTALLMODE=system
			;;
		--suffix)
			shift
			SUFFIX="$1"
			;;
		--version)
			driver=plain
			version
			exit
			;;
		*)
			driver=plain
			usage
			exit
			;;
	esac
	shift
done

if $talk
then
	version
fi

if ! $interactive && [ -z "$INSTALLMODE" ]
then
	ui_error "Please specify --user or --system for unattended installation."
fi

if ! $force
then
	check_os
fi

if [ -z "$INSTALLMODE" ]
then
	if [ ! -w /usr/local ] && ! $force
	then
		ui_warn "Because you are not logged in as root, Opera will be installed just for you (under $HOME/.local). If this is not what you want, please try again as root."
		INSTALLMODE=user
	else
		ui_menu "Would you like to install Opera globally (under /usr/local) or just for yourself (under $HOME/.local)?" "system" "Install globally" "user" "Install just for user $USER"
		INSTALLMODE=$answer
	fi
fi

case $INSTALLMODE in
	user)
		PREFIX=$HOME/.local
		;;
	system)
		PREFIX=/usr/local
		if [ ! -w $PREFIX ] && ! $force
		then
			ui_error "You must be root to install software system-wide."
		fi
		;;
esac

if $interactive && [ -z "$SUFFIX" ]
then
	bad_suffix=ui_info
else
	bad_suffix=ui_error
fi

while true
do
	if $interactive && [ -z "$SUFFIX" ]
	then
		ui_input "You can install Opera with a suffix, so that the installation does not conflict with other installations of Opera you might have. For example, if you specify 10.53 as the suffix, Opera files will be installed under $PREFIX/share/opera-10.53 and $PREFIX/lib/opera-10.53, and you will have to run $PREFIX/bin/opera-10.53 to run it. The default location of your profile directory will then be ~/.opera-10.53. If you want that, please enter the suffix without the leading dash below. Only Latin letters, digits, periods and dashes are allowed.

Accepting the empty default is a safe choice." || exit
		SUFFIX=$answer
	fi
	case "$SUFFIX" in
		*[!-.A-Za-z0-9]*)
			$bad_suffix "The installation suffix is only allowed to contain Latin letters, digits, periods and dashes."
			;;
		[-.]*)
			$bad_suffix "The installation suffix cannot start with a period or dash."
			;;
		'')
			_SUFFIX=''
			USUFFIX=''
			break
			;;
		*)
			_SUFFIX=" $SUFFIX"
			USUFFIX=-$(echo $SUFFIX | tr a-z A-Z)
			SUFFIX=-$SUFFIX
			break
			;;
	esac
	SUFFIX=''
done

if [ -f "$PREFIX/share/opera$SUFFIX/package-id.ini" ]
then
	upgrade_version=$(sed -ne '/^Version=\(.*\)$/s//\1/p' "$PREFIX/share/opera$SUFFIX/package-id.ini")
	upgrade_build=$(sed -ne '/^Build=\(.*\)$/s//\1/p' "$PREFIX/share/opera$SUFFIX/package-id.ini")
	if [ -n "$upgrade_version" -a -n "$upgrade_build" ]
	then
		if [ "$upgrade_version" = 10.53 -a "$upgrade_build" = 6330 ]
		then
			msg="The chosen location already contains an installation of Opera 10.53 build 6330. The installer will attempt to refresh it."
		else
			msg="The chosen location contains an installation of Opera $upgrade_version build $upgrade_build. The installer will attempt to upgrade it to version 10.53 build 6330."
		fi
		if $interactive
		then
			ui_warn "$msg"
		elif $talk
		then
			ui_message "$msg"
		fi
	fi
fi

ui_progress_begin "Verifying package"
iterate verify_file
ui_progress_end

if [ -f $tempdir/damaged ] && ! $force
then
	ui_error "The following files are missing or damaged:" $tempdir/damaged
fi

if ! $force
then
	need_rollback=true
fi

make_tempdir

if [ -x "$PREFIX/bin/uninstall-opera$SUFFIX" ]
then
	if $talk
	then
		ui_info "Removing old files..."
	fi
	"$PREFIX/bin/uninstall-opera$SUFFIX" --upgrade $tempdir
fi

ui_progress_begin "Installing files"
iterate install_file
ui_progress_end

if $talk
then
	ui_info "Finalizing installation..."
fi
need_rollback=false
if [ -f $tempdir/commit ]
then
	. $tempdir/commit
fi
finalize_xdg

if $talk
then
	if [ -n "$upgrade_version" -a -n "$upgrade_build" ]
	then
		done='upgraded'
	else
		done='installed'
	fi
	ui_message "Opera has been $done successfully. To start, run $PREFIX/bin/opera$SUFFIX (you might want to add this location to your PATH).

To manage installed Opera Widgets, run $PREFIX/bin/opera-widget-manager$SUFFIX.

To uninstall Opera, run $PREFIX/bin/uninstall-opera$SUFFIX."
fi
