From ea4b854f128edb7d8a6d49c7b75ad17a911bbd7b Mon Sep 17 00:00:00 2001 From: Pete Date: Mon, 4 Dec 2023 16:05:35 +0000 Subject: [PATCH] Make repo init switchable --- src/build.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/build.sh b/src/build.sh index c4c65b6..182d248 100755 --- a/src/build.sh +++ b/src/build.sh @@ -187,11 +187,15 @@ for branch in ${BRANCH_NAME//,/ }; do echo ">> [$(date)] Resetting vendor and undoing patches disabled" | tee -a "$repo_log" fi - echo ">> [$(date)] (Re)initializing branch repository" | tee -a "$repo_log" - if [ "$LOCAL_MIRROR" = true ]; then - ( yes||: ) | repo init -u https://github.com/LineageOS/android.git --reference "$MIRROR_DIR" -b "$branch" --git-lfs &>> "$repo_log" + if [ "$CALL_REPO_INIT" = true ]; then + echo ">> [$(date)] (Re)initializing branch repository" | tee -a "$repo_log" + if [ "$LOCAL_MIRROR" = true ]; then + ( yes||: ) | repo init -u https://github.com/LineageOS/android.git --reference "$MIRROR_DIR" -b "$branch" --git-lfs &>> "$repo_log" + else + ( yes||: ) | repo init -u https://github.com/LineageOS/android.git -b "$branch" --git-lfs &>> "$repo_log" + fi else - ( yes||: ) | repo init -u https://github.com/LineageOS/android.git -b "$branch" --git-lfs &>> "$repo_log" + echo ">> [$(date)] Calling repo init disabled" fi # Copy local manifests to the appropriate folder in order take them into consideration @@ -433,7 +437,6 @@ for branch in ${BRANCH_NAME//,/ }; do echo ">> [$(date)] Calling mka for $codename, $branch branch disabled" fi - # Remove old zips and logs if [ "$DELETE_OLD_ZIPS" -gt "0" ]; then if [ "$ZIP_SUBDIR" = true ]; then