mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 06:31:18 +02:00
Move Catalyst upgrade inside catalyst_init and add --jobs option
catalyst.sh is a library file, so it shouldn't upgrade Catalyst until actually taking action. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This commit is contained in:
parent
0463d58c63
commit
2ba2b0236d
@ -3,11 +3,6 @@
|
|||||||
# Use of this source code is governed by a BSD-style license that can be
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
# found in the LICENSE file.
|
# 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
|
# common.sh should be sourced first
|
||||||
[[ -n "${DEFAULT_BUILD_ROOT}" ]] || exit 1
|
[[ -n "${DEFAULT_BUILD_ROOT}" ]] || exit 1
|
||||||
. "${SCRIPTS_DIR}/sdk_lib/sdk_util.sh" || exit 1
|
. "${SCRIPTS_DIR}/sdk_lib/sdk_util.sh" || exit 1
|
||||||
@ -171,6 +166,11 @@ catalyst_init() {
|
|||||||
die_notrace "catalyst not found, not installed or bad PATH?"
|
die_notrace "catalyst not found, not installed or bad PATH?"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Before doing anything else, ensure we have at least Catalyst 4.
|
||||||
|
if catalyst --version | grep -q "Catalyst [0-3]\."; then
|
||||||
|
emerge --verbose "--jobs=${NUM_JOBS}" --oneshot ">=dev-util/catalyst-4" || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
DEBUG=()
|
DEBUG=()
|
||||||
if [[ ${FLAGS_debug} -eq ${FLAGS_TRUE} ]]; then
|
if [[ ${FLAGS_debug} -eq ${FLAGS_TRUE} ]]; then
|
||||||
DEBUG=("--debug")
|
DEBUG=("--debug")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user