* adding file to remove URI action for WhiteStork - it has not been sended last...
authorstranger <dariusz.wiechecki@gmail.com>
Thu, 9 Aug 2007 11:57:18 +0000 (11:57 +0000)
committerstranger <dariusz.wiechecki@gmail.com>
Thu, 9 Aug 2007 11:57:18 +0000 (11:57 +0000)
git-svn-id: file:///svnroot/mdictionary/trunk@161 5bde0345-f819-0410-ac75-e5045f9217cc

debian/whitestorkgui.prerm [new file with mode: 0755]

diff --git a/debian/whitestorkgui.prerm b/debian/whitestorkgui.prerm
new file mode 100755 (executable)
index 0000000..fab7fbb
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+echo -e "Preremoving actions..."
+
+#su $USER -c 'rm -rf /usr/share/WhiteStork'
+
+if [ "$1" != "upgrade" ]
+then
+       echo -e -n "Removing gconf configuration..\n"
+       su $USER -c 'gconftool-2 --recursive-unset /apps/maemo/WhiteStork/Dictionaries'
+       su $USER -c 'gconftool-2 --recursive-unset /apps/maemo/WhiteStork/Engines'
+
+   if [ -f /usr/share/applications/uri-action-defaults.list ]
+   then
+      if [ ! -z `grep 'mdict=hildon-whitestork.desktop' /usr/share/applications/uri-action-defaults.list` ]
+      then
+         echo -e "Removing mdict URI action - uri-action-defaults.list"
+         grep -v 'mdict=hildon-whitestork.desktop' /usr/share/applications/uri-action-defaults.list > tmp
+         cat tmp > /usr/share/applications/uri-action-defaults.list
+      fi
+
+      if [ ! -z `grep 'mdict=hildon-whitestork.desktop' /usr/share/applications/schemeinfo.cache` ]
+      then
+         echo -e "Removing mdict URI action - schemeinfo.cache"
+         grep -v 'mdict=hildon-whitestork.desktop' /usr/share/applications/schemeinfo.cache > tmp
+         cat tmp > /usr/share/applications/schemeinfo.cache
+         rm -fr tmp
+      fi
+   fi
+fi
+
+# End automatically added section