prerm.include revision 4e180b6a0b4720a9b8e9e959a882386f690f08ff
1# Remove icons from the system icons
2XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null || true`"
3if [ ! -x "$XDG_ICON_RESOURCE" ]; then
4  echo "Error: Could not find xdg-icon-resource" >&2
5  exit 1
6fi
7for icon in "@@INSTALLDIR@@/product_logo_"*.png; do
8  size="${icon##*/product_logo_}"
9  "$XDG_ICON_RESOURCE" uninstall --size "${size%.png}" "@@PACKAGE@@"
10done
11
12# Remove the entry from the system menu
13XDG_DESKTOP_MENU="`which xdg-desktop-menu 2> /dev/null || true`"
14UPDATE_MENUS="`which update-menus 2> /dev/null || true`"
15if [ ! -x "$XDG_DESKTOP_MENU" ]; then
16  echo "Error: Could not find xdg-desktop-menu" >&2
17  exit 1
18fi
19"$XDG_DESKTOP_MENU" uninstall @@INSTALLDIR@@/@@PACKAGE@@.desktop
20
21if [ -x "$UPDATE_MENUS" ]; then
22  update-menus
23fi
24