#!/bin/bash

#divert 
if [ upgrade != "$1" ] || dpkg --compare-versions "$2" lt 0.6; then
  dpkg-divert --package ubuntu-samos-config --rename /usr/share/backgrounds/warty-final-ubuntu.png
fi

if [ upgrade != "$1" ] || dpkg --compare-versions "$2" lt 9; then
  dpkg-divert --package ubuntu-samos-config --divert /usr/share/applications/openoffice.org-writer.desktop.orig --rename /usr/share/applications/openoffice.org-writer.desktop
  dpkg-divert --package ubuntu-samos-config --divert /usr/share/applications/openoffice.org-math.desktop.orig --rename /usr/share/applications/openoffice.org-math.desktop
  dpkg-divert --package ubuntu-samos-config --divert /usr/share/applications/openoffice.org-impress.desktop.orig --rename /usr/share/applications/openoffice.org-impress.desktop
  dpkg-divert --package ubuntu-samos-config --divert /usr/share/applications/openoffice.org-draw.desktop.orig --rename /usr/share/applications/openoffice.org-draw.desktop
  dpkg-divert --package ubuntu-samos-config --divert /usr/share/applications/openoffice.org-calc.desktop.orig --rename /usr/share/applications/openoffice.org-calc.desktop
  dpkg-divert --package ubuntu-samos-config --divert /usr/share/applications/openoffice.org-base.desktop.orig --rename /usr/share/applications/openoffice.org-base.desktop
fi

#DEBHELPER#

