xref: /trunk/main/sysui/desktop/debian/postrm (revision cdf0e10c)
1*cdf0e10cSrcweir#!/bin/sh
2*cdf0e10cSrcweir# run always - both when upgrading as well as when erasing the package.
3*cdf0e10cSrcweir# Make sure this works when converted to .deb using alien.
4*cdf0e10cSrcweirif [ "$1" != "purge" ]; then
5*cdf0e10cSrcweir  if [ -x /usr/bin/update-mime-database ]; then
6*cdf0e10cSrcweir    update-mime-database /usr/share/mime
7*cdf0e10cSrcweir  fi
8*cdf0e10cSrcweir  if [ -x /usr/bin/update-desktop-database ]; then
9*cdf0e10cSrcweir    update-desktop-database -q /usr/share/applications
10*cdf0e10cSrcweir  fi
11*cdf0e10cSrcweir  if [ -x /usr/bin/update-menus ]; then
12*cdf0e10cSrcweir    update-menus
13*cdf0e10cSrcweir  fi
14*cdf0e10cSrcweir  for theme in gnome hicolor locolor; do
15*cdf0e10cSrcweir    if [ -e /usr/share/icons/$theme/icon-theme.cache ] ; then
16*cdf0e10cSrcweir      # touch it, just in case we cannot find the binary...
17*cdf0e10cSrcweir      touch /usr/share/icons/$theme
18*cdf0e10cSrcweir      if (which gtk-update-icon-cache); then
19*cdf0e10cSrcweir        gtk-update-icon-cache /usr/share/icons/$theme
20*cdf0e10cSrcweir      fi
21*cdf0e10cSrcweir      # ignore errors (e.g. when there is a cache, but no index.theme)
22*cdf0e10cSrcweir      true
23*cdf0e10cSrcweir    fi
24*cdf0e10cSrcweir  done
25*cdf0e10cSrcweirfi
26*cdf0e10cSrcweirexit 0
27