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

set -e

case "$1" in
    configure)
        if [ "$(awk '/luks/{print $3}' /etc/crypttab 2>/dev/null)" ]; then
           cp -ar /usr/share/grub/themes/tuxedo /boot/efi/
           echo GRUB_THEME=/boot/efi/tuxedo/theme.txt > /etc/default/grub.d/tuxedo-theme.cfg
        else
           echo GRUB_THEME=/usr/share/grub/themes/tuxedo/theme.txt > /etc/default/grub.d/tuxedo-theme.cfg
        fi
              update-grub
    ;;

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

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

#DEBHELPER#

exit 0

