Changes for January 2024
This commit is contained in:
parent
de01a6f9a1
commit
5ecf530ffb
31
apply_patches.sh
Normal file
31
apply_patches.sh
Normal file
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
patches="$(readlink -f -- $1)"
|
||||
|
||||
shopt -s nullglob
|
||||
for project in $(cd $patches; echo *);do
|
||||
p="$(tr _ / <<<$project |sed -e 's;platform/;;g')"
|
||||
[ "$p" == build ] && p=build/make
|
||||
[ "$p" == vendor/hardware/overlay ] && p=vendor/hardware_overlay
|
||||
[ "$p" == vendor/partner/gms ] && p=vendor/partner_gms
|
||||
pushd $p
|
||||
git clean -fdx; git reset --hard
|
||||
for patch in $patches/$project/*.patch;do
|
||||
if git apply --check $patch;then
|
||||
git am $patch
|
||||
elif patch -f -p1 --dry-run < $patch > /dev/null;then
|
||||
#This will fail
|
||||
git am $patch || true
|
||||
patch -f -p1 < $patch
|
||||
git add -u
|
||||
git am --continue
|
||||
else
|
||||
echo "Failed applying $patch"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
popd
|
||||
done
|
||||
|
@ -58,7 +58,7 @@ echo ""
|
||||
|
||||
apply_patches() {
|
||||
echo "Applying patch group ${1}"
|
||||
bash ~/treble_experimentations/apply-patches.sh ./lineage_patches_unified/${1}
|
||||
bash ./lineage_build_unified/apply_patches.sh ./lineage_patches_unified/${1}
|
||||
}
|
||||
|
||||
prep_device() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user