#!/bin/bash

phase="$1"
version="$2"

if [ "x$phase" = "xpost" ] && [ "x$version" = "x5.0-0" ]; then
	[ -f /etc/apt/preferences.d/99kopanotest.pref ] ||
	cat >/etc/apt/preferences.d/99kopanotest.pref <<__PREF__
Package: *kopano* python3-mapi *z-push*
Pin: origin appcenter-test.software-univention.de
Pin-Priority: 1001
__PREF__
	
	[ -f /etc/apt/preferences.d/99kopano.pref ] ||
	cat >/etc/apt/preferences.d/99kopano.pref <<__PREF__
Package: *kopano* python3-mapi *z-push*
Pin: origin appcenter.software-univention.de
Pin-Priority: 1001
__PREF__

fi

exit 0
