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

Commit 1e1c5e3

Browse files
committed
floko: Use .diff instead of .patch
* and use only `git apply` to make script more concise Signed-off-by: lindwurm <lindwurm.q@gmail.com>
1 parent b1e370a commit 1e1c5e3

8 files changed

+22
-25
lines changed

build.patch renamed to build.diff

File renamed without changes.
File renamed without changes.

floko.sh

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,55 @@
11
#!/bin/bash
22
# SPDX-License-Identifier: GPL-3.0-or-later
33

4-
path_to_patches="$(pwd)"
54
build_home="${HOME}/android/floko"
5+
path_to_patches="$(pwd)"
6+
7+
apply_patch() {
8+
echo ">> [$(date)] Applying the patch to $(pwd | sed 's@.*floko/@@g')"
9+
git apply -p1 "${path_to_patches}/${1}.diff"
10+
}
611

712
cd ${build_home}/bootable/recovery
8-
echo ">> [$(date)] Applying the patch to bootable/recovery"
9-
git apply -p1 "${path_to_patches}/bootable_recovery.diff"
13+
apply_patch bootable_recovery
1014

1115
cd ${build_home}/build/make
12-
echo ">> [$(date)] Applying the patch to build/make"
13-
patch --quiet --force -p1 -i "${path_to_patches}/build.patch"
16+
apply_patch build
1417

1518
cd ${build_home}/build/soong
16-
echo ">> [$(date)] Applying the patch to build/soong"
17-
patch --quiet --force -p1 -i "${path_to_patches}/build_soong.patch"
19+
apply_patch build_soong
1820

1921
cd ${build_home}/frameworks/base
20-
echo ">> [$(date)] Applying the patch to frameworks/base"
21-
patch --quiet --force -p1 -i "${path_to_patches}/frameworks_base.patch"
22+
apply_patch frameworks_base
2223
# This is workaround; If the patch failed because something changed in upstream, remove this file anyway.
23-
echo ">> [$(date)] Removing PixelPropsUtils.java"
24+
echo ">> [$(date)] -- Removing PixelPropsUtils.java"
2425
git rm core/java/com/android/internal/util/crdroid/PixelPropsUtils.java
2526

2627
cd ${build_home}/lineage-sdk
27-
echo ">> [$(date)] Applying the patch to lineage-sdk"
28-
patch --quiet --force -p1 -i "${path_to_patches}/lineage-sdk.patch"
28+
apply_patch lineage-sdk
29+
echo ">> [$(date)] -- Rebranding crDroid to FlokoROM"
2930
find lineage/res/res/values*/strings.xml -type f | xargs sed -i -e "s/crDroid/FlokoROM/g"
3031

3132
cd ${build_home}/packages/apps/crDroidSettings
32-
echo ">> [$(date)] Applying the patch to packages/apps/crDroidSettings"
33-
patch --quiet --force -p1 -i "${path_to_patches}/packages_apps_crDroidSettings.patch"
33+
apply_patch packages_apps_crDroidSettings
3434

3535
cd ${build_home}/packages/apps/LineageParts
36-
echo ">> [$(date)] Applying the patch to packages/apps/LineageParts"
37-
patch --quiet --force -p1 -i "${path_to_patches}/packages_apps_LineageParts.patch"
36+
apply_patch packages_apps_LineageParts
37+
echo ">> [$(date)] -- Rebranding crDroid to FlokoROM"
3838
find res/values*/strings.xml -type f | xargs sed -i -e "s/crDroid/FlokoROM/g"
3939

4040
cd ${build_home}/packages/apps/Settings
41-
echo ">> [$(date)] Applying the patch to packages/apps/Settings"
42-
git apply -p1 "${path_to_patches}/packages_apps_Settings.diff"
41+
apply_patch packages_apps_Settings
4342

4443
cd ${build_home}/packages/apps/SetupWizard
45-
echo ">> [$(date)] Applying the patch to packages/apps/SetupWizard"
46-
git apply -p1 "${path_to_patches}/packages_apps_SetupWizard.diff"
44+
apply_patch packages_apps_SetupWizard
45+
echo ">> [$(date)] -- Rebranding crDroid to FlokoROM"
4746
find res/values*/strings.xml -type f | xargs sed -i -e "s/crDroid/FlokoROM/g"
4847

4948
cd ${build_home}/vendor/addons
50-
echo ">> [$(date)] Applying the patch to vendor/addons"
51-
git apply -p1 "${path_to_patches}/vendor_addons.diff"
49+
apply_patch vendor_addons
5250

5351
cd ${build_home}/vendor/lineage
54-
echo ">> [$(date)] Applying the patch to vendor/lineage"
55-
patch --quiet --force -p1 -i "${path_to_patches}/vendor_lineage.patch"
52+
apply_patch vendor_lineage
5653
# This is workaround; If the patch failed because something changed in upstream, remove this file anyway.
57-
echo ">> [$(date)] Removing version.mk"
54+
echo ">> [$(date)] -- Removing version.mk"
5855
git rm config/version.mk
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)