diff --git a/build_library/catalyst.sh b/build_library/catalyst.sh index fab4a947c1..4706007c40 100644 --- a/build_library/catalyst.sh +++ b/build_library/catalyst.sh @@ -3,6 +3,11 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +# Before doing anything, ensure we have at least Catalyst 4. +if catalyst --version | grep -q "Catalyst [0-3]\."; then + sudo emerge -v1 ">=dev-util/catalyst-4" || exit 1 +fi + # common.sh should be sourced first [[ -n "${DEFAULT_BUILD_ROOT}" ]] || exit 1 . "${SCRIPTS_DIR}/sdk_lib/sdk_util.sh" || exit 1