Skip to content

Commit

Permalink
Merge pull request #726 from lineageos4microg/pf-fix-722
Browse files Browse the repository at this point in the history
Clean up previous changes in `config/common.mk`
  • Loading branch information
petefoth authored Jan 13, 2025
2 parents 93bc1ff + ee6af1c commit b7ab9cd
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/new_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,21 @@ if [ -n "$branch" ] && [ -n "$devices" ]; then
android_version_major=$(cut -d '.' -f 1 <<< $android_version)
fi

if [ "$RESET_VENDOR_UNDO_PATCHES" = true ]; then
# Remove previous changes of vendor/cm, vendor/lineage and frameworks/base (if they exist)
# TODO: maybe reset everything using https://source.android.com/setup/develop/repo#forall
for path in "vendor/cm" "vendor/lineage" "frameworks/base" "packages/apps/PermissionController" "packages/modules/Permission"; do
if [ -d "$path" ]; then
cd "$path"
git reset -q --hard
git clean -q -fd
cd "$SRC_DIR/$branch_dir"
fi
done
else
echo ">> [$(date)] Resetting vendor and undoing patches disabled" | tee -a "$repo_log"
fi

# Handle local manifests
## Copy local manifests
echo ">> [$(date)] Copying '$LMANIFEST_DIR/*.xml' to '.repo/local_manifests/'"
Expand Down Expand Up @@ -209,7 +224,6 @@ if [ "$LOCAL_MIRROR" = true ]; then
cd "$source_dir"
fi


# - main sync and build loop
# For each device in `$DEVICE_LIST`
for codename in ${devices//,/ }; do
Expand Down

0 comments on commit b7ab9cd

Please sign in to comment.