#!/bin/bash

. ${TOOLKIT}-functions.sh

case $DISTRIB_FULL_ID in
  Ubunutu-9.*|Ubuntu-10.*)
  	exit 0 ;;

  Ubuntu*)
	# remove old stuff (if present)
	# - libreoffice 3
	# - libreoffice 4.1
	#
	pkgs3="
		libreoffice
		libreoffice-common
		libreoffice-help-it
		libreoffice-l10n-it
		libreoffice-help-es
		libreoffice-l10n-es
		libreoffice-help-de
		libreoffice-l10n-de
		openoffice.org-thesaurus-de
		libreoffice-help-fr
		libreoffice-l10n-fr
		openoffice.org-thesaurus-fr
	"

	pkgs41=$(dpkg -l | fgrep 'libreoffice4.1' | sed -e 's/^....//' -e 's/ .*//')

	remove_pkgs $pkgs3 $pkgs41
	;;
esac

# clean old files
purgefiles /usr/local/bin/soffice

exit 0
