From c4023e77f2f7bce2f24730d8af9bb100b25bfd8a Mon Sep 17 00:00:00 2001 From: dakkar Date: Fri, 13 Jul 2018 10:02:12 +0100 Subject: make repo setup optional --- build.sh | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 60e33b6..8f7df32 100644 --- a/build.sh +++ b/build.sh @@ -10,8 +10,6 @@ mkdir -p release/"$release_name" jobs=$(nproc) -repo init -u https://github.com/LineageOS/android.git -b lineage-15.1 - function clone_or_checkout() { local dir="$1" local repo="$2" @@ -29,16 +27,24 @@ function clone_or_checkout() { fi } -clone_or_checkout .repo/local_manifests "$thisdir" master -clone_or_checkout dakkar-patches "$thisdir" master -clone_or_checkout patches https://github.com/phhusson/treble_patches android-8.1 +function setup_code() { + repo init -u https://github.com/LineageOS/android.git -b lineage-15.1 + + clone_or_checkout .repo/local_manifests "$thisdir" master + clone_or_checkout dakkar-patches "$thisdir" master + clone_or_checkout patches https://github.com/phhusson/treble_patches android-8.1 -repo sync -c -j$jobs --force-sync + repo sync -c -j$jobs --force-sync -rm -f device/*/sepolicy/common/private/genfs_contexts + rm -f device/*/sepolicy/common/private/genfs_contexts + + bash "$thidir/apply-patches.sh" patches + bash "$thidir/apply-patches.sh" dakkar-patches +} -bash "$thidir/apply-patches.sh" patches -bash "$thidir/apply-patches.sh" dakkar-patches +if [[ "$1" == "setup" ]]; then + setup_code +fi . build/envsetup.sh -- cgit v1.2.3