#!/bin/sh

set -e

case "$1" in
    configure)
        cat << EOF > /etc/apt/sources.list.d/clea.sources
# This file is automatically generated by the apt-repo-clea package.
# Do not edit this file manually.
Types: deb
URIs: https://europe-apt.pkg.dev/projects/s-apt-prd
Suites: clea-debian-packages
Components: main
Signed-By: /usr/share/keyrings/clea-archive-keyring.pgp
EOF
        if [ -z "$2" ]; then
            echo "Clea APT repository added. Run 'sudo apt update' to refresh the package list."
        fi
    ;;

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

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

#DEBHELPER#

exit 0
