From 97333825be2e5bef153d3e9bf0135f0df36bfa22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Pe=C4=8Dovnik?= Date: Tue, 14 Jul 2020 13:10:44 +0200 Subject: [PATCH] Reverting bce24a2e8d95e7e60a92d5234d343965634571a1 with a condition. (#2091) @the-going --- lib/compilation.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/compilation.sh b/lib/compilation.sh index 8b152eeb1d..d296631f8a 100644 --- a/lib/compilation.sh +++ b/lib/compilation.sh @@ -155,6 +155,13 @@ compile_uboot() target_patchdir=$(cut -d';' -f2 <<< "${target}") target_files=$(cut -d';' -f3 <<< "${target}") + # only checkout when we go several times over the source + if [[ $target_cycles -ge 1 ]]; then + display_alert "Checking out to clean sources" + git checkout -f -q HEAD + fi + target_cycles=$((target_cycles+1)) + if [[ $CLEAN_LEVEL == *make* ]]; then display_alert "Cleaning" "$BOOTSOURCEDIR" "info" (cd "${SRC}/cache/sources/${BOOTSOURCEDIR}"; make clean > /dev/null 2>&1)