#!/bin/sh
# postinst script for xivo-fetchfw
#
# see: dh_installdeb(1)

case "$1" in
    configure)
        if [ -d /var/lib/pf-xivo-fetchfw/installed ]; then
            rsync -av /var/lib/pf-xivo-fetchfw/installed/ /var/lib/xivo-fetchfw/installed/
            rm -rf /var/lib/pf-xivo-fetchfw/installed/*
        fi
        if [ -d /var/cache/pf-xivo-fetchfw ]; then
            rsync -av /var/cache/pf-xivo-fetchfw/ /var/cache/xivo-fetchfw/
            rm -rf /var/cache/pf-xivo-fetchfw/*
        fi
    ;;
    abort-upgrade|abort-remove|abort-deconfigure)
    
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0
