From f73debcdc5ba2f0ecb6cc75dc02009313e154cf1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 17 Dec 2012 13:41:11 +0100 Subject: Correcting config tree version check for the current version. --- functions/defaults.sh | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/functions/defaults.sh b/functions/defaults.sh index c351068aa..2e86fb1f0 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -1169,20 +1169,24 @@ Check_defaults () # except when bootstrapping the functions/defaults etc.). CURRENT_CONFIG_VERSION="$(echo ${LB_CONFIG_VERSION} | awk -F. '{ print $1 }')" - if [ ${CURRENT_CONFIG_VERSION} -ge 5 ] + if [ ${CURRENT_CONFIG_VERSION} -ne 4 ] then - Echo_error "This config tree is too new for this version of live-build (${VERSION})." - Echo_error "Aborting build, please get a new version of live-build." - - exit 1 - elif [ ${CURRENT_CONFIG_VERSION} -le 3 ] - then - Echo_error "This config tree is too old for this version of live-build (${VERSION})." - Echo_error "Aborting build, please regenerate the config tree." - exit 1 - else - Echo_warning "This config tree does not specify a format version or has an unknown version number." - Echo_warning "Continuing build, but it could lead to errors or different results. Please regenerate the config tree." + if [ ${CURRENT_CONFIG_VERSION} -ge 5 ] + then + Echo_error "This config tree is too new for this version of live-build (${VERSION})." + Echo_error "Aborting build, please get a new version of live-build." + + exit 1 + elif [ ${CURRENT_CONFIG_VERSION} -le 3 ] + then + Echo_error "This config tree is too old for this version of live-build (${VERSION})." + Echo_error "Aborting build, please regenerate the config tree." + + exit 1 + else + Echo_warning "This config tree does not specify a format version or has an unknown version number." + Echo_warning "Continuing build, but it could lead to errors or different results. Please regenerate the config tree." + fi fi fi -- cgit v1.2.3