Skip to content

Commit

Permalink
Re-enable use of local mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
petefoth committed Dec 13, 2024
1 parent a1a7e28 commit 20c6098
Showing 1 changed file with 21 additions and 22 deletions.
43 changes: 21 additions & 22 deletions src/new_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ echo ">> [$(date)] Devices: $devices"
vendor=lineage

## Check for non-working environment variable values
if [ "$LOCAL_MIRROR" = true ]; then
echo "Using LOCAL_MIRROR is not yet working"
exit 1
fi
# if [ "$LOCAL_MIRROR" = true ]; then
# echo "Using LOCAL_MIRROR is not yet working"
# exit 1
# fi

if [ "$BUILD_OVERLAY" = true ]; then
echo "Using BUILD_OVERLAY is not yet working"
Expand Down Expand Up @@ -191,24 +191,23 @@ rsync -a --delete --include '*.xml' --exclude '*' "$LMANIFEST_DIR/" .repo/local_

# Sync mirror if we're using one
if [ "$LOCAL_MIRROR" = true ]; then
echo "Using LOCAL_MIRROR is not yet working"

# cd "$MIRROR_DIR"
# if [ "$INIT_MIRROR" = true ]; then
# if [ ! -d .repo ]; then
# echo ">> [$(date)] Initializing mirror repository" | tee -a "$repo_log"
# ( yes||: ) | repo init -u https://github.com/LineageOS/mirror --mirror --no-clone-bundle -p linux --git-lfs &>> "$repo_log"
# fi
# else
# echo ">> [$(date)] Initializing mirror repository disabled" | tee -a "$repo_log"
# fi
# if [ "$SYNC_MIRROR" = true ]; then
# echo ">> [$(date)] Syncing mirror repository" | tee -a "$repo_log"
# repo sync "${jobs_arg[@]}" "${retry_fetches_arg[@]}" --force-sync --no-clone-bundle &>> "$repo_log"
#
# else
# echo ">> [$(date)] Sync mirror repository disabled" | tee -a "$repo_log"
# fi

cd "$MIRROR_DIR"
if [ "$INIT_MIRROR" = true ]; then
if [ ! -d .repo ]; then
echo ">> [$(date)] Initializing mirror repository" | tee -a "$repo_log"
( yes||: ) | repo init -u https://github.com/LineageOS/mirror --mirror --no-clone-bundle -p linux --git-lfs &>> "$repo_log"
fi
else
echo ">> [$(date)] Initializing mirror repository disabled" | tee -a "$repo_log"
fi
if [ "$SYNC_MIRROR" = true ]; then
echo ">> [$(date)] Syncing mirror repository" | tee -a "$repo_log"
repo sync "${jobs_arg[@]}" "${retry_fetches_arg[@]}" --force-sync --no-clone-bundle &>> "$repo_log"

else
echo ">> [$(date)] Sync mirror repository disabled" | tee -a "$repo_log"
fi
fi


Expand Down

0 comments on commit 20c6098

Please sign in to comment.