#!/bin/bash
# postinst script for #PACKAGE#
#
# see: dh_installdeb(1)

set -e


if [[ "$1" = "configure" || "$1" = "abort-upgrade" || "$1" = "abort-remove" ]]; then
    update-alternatives --install \
        /usr/share/sddm/themes/debian-theme \
        sddm-debian-theme \
        /usr/share/sddm/themes/wintersky 50
fi

case "$1" in
    configure)
        # keep the old configuration
        if [ -f /etc/sddm.conf ]; then
            cp -f /usr/share/sddm/wintersky/sddm.conf /etc/sddm.conf.dpkg-new
        else
            cp -f /usr/share/sddm/wintersky/sddm.conf /etc/sddm.conf
        fi
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

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

#DEBHELPER#

exit 0
	
