#!/bin/sh
set -e

if dpkg-query -W -f='${Status} ${Version}\n' plasma-desktop 2>/dev/null | grep -q '^install ok installed'; then
    VER=$(dpkg-query -W -f='${Version}' plasma-desktop)
    if dpkg --compare-versions "$VER" ge "4:6.3.5~"; then
        echo "This package is not compatible with your system, it has already been converted." >&2
        exit 1
    fi
fi
exit 0
