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