Skip to content
This repository was archived by the owner on Jan 27, 2025. It is now read-only.

Commit 65b9fa5

Browse files
committed
Get patches from treble_patches git
1 parent f3b9391 commit 65b9fa5

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

apply-patches.sh

+1-7
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,7 @@
22

33
set -e
44

5-
finish() {
6-
rm -Rf $patches
7-
}
8-
trap finish EXIT
9-
10-
patches="$(mktemp -d)"
11-
unzip "$1" -d $patches
5+
patches="$(readlink -f -- $1)"
126

137
for project in $(cd $patches/patches; echo *);do
148
p="$(tr _ / <<<$project |sed -e 's;platform/;;g')"

build-rom.sh

+10-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ rom_fp="$(date +%y%m%d)"
44
mkdir -p release/$rom_fp/
55
set -e
66

7-
if [ "$#" -ne 3 ];then
8-
echo "Usage: $0 <android-8.1> <carbon|lineage|rr> <patch to release patches.zip>"
7+
if [ "$#" -ne 2 ];then
8+
echo "Usage: $0 <android-8.1> <carbon|lineage|rr>"
99
exit 0
1010
fi
1111
localManifestBranch=$1
1212
rom=$2
13-
patches=$3
1413

1514
if [ "$rom" == "carbon" ];then
1615
repo init -u https://github.com/CarbonROM/android -b cr-6.1
@@ -25,14 +24,21 @@ if [ -d .repo/local_manifests ] ;then
2524
else
2625
git clone https://github.com/phhusson/treble_manifest .repo/local_manifests -b $localManifestBranch
2726
fi
27+
28+
if [ -d patches ];then
29+
( cd patches; git fetch; git reset --hard; git checkout origin/$localManifestBranch)
30+
else
31+
git clone https://github.com/phhusson/treble_patches patches -b $localManifestBranch
32+
fi
33+
2834
#We don't want to replace from AOSP since we'll be applying patches by hand
2935
rm -f .repo/local_manifests/replace.xml
3036
rm -f .repo/local_manifests/opengapps.xml
3137

3238
repo sync -c -j 4 --force-sync
3339
(cd device/phh/treble; git clean -fdx; bash generate.sh $rom)
3440

35-
bash "$(dirname "$0")/apply-patches.sh" $patches
41+
bash "$(dirname "$0")/apply-patches.sh" patches
3642

3743
. build/envsetup.sh
3844

0 commit comments

Comments
 (0)