#!/bin/bash

. ${TOOLKIT}-functions.sh

release=`jtconf install.distrib_release` || \
	exit_missing_define install.distrib_release
codename=`jtconf install.distrib_codename` || \
	exit_missing_define install.distrib_codename


# controlla versione
err=

[ $DISTRIB_RELEASE != $release ] && {
	err="$err\nyou are trying to use a different release repository"
	err="$err\n(this system is $DISTRIB_RELEASE, repos are $release)"
	getconfirm install.force_release || exit_err 1 "$err"
}
[ $DISTRIB_CODENAME != $codename ] && {
	err="$err\nwrong codename '$codename' in repos definitions"
	err="$err\n(the codename must be '$DISTRIB_CODENAME')"
	getconfirm install.force_release || exit_err 1 "$err"
}
[ "X$err" != "X" ] && putwarning "WARNING on repos definitions" "$err"

exit 0
