summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2018-07-13 10:02:12 +0100
committerdakkar <dakkar@thenautilus.net>2018-07-13 10:02:12 +0100
commitc4023e77f2f7bce2f24730d8af9bb100b25bfd8a (patch)
tree4ff2e0234d3e33a6c45cb968e63732a6d03a0fd4 /build.sh
parentimport docker stuff (diff)
downloaddakkar-android-huawei-m5-c4023e77f2f7bce2f24730d8af9bb100b25bfd8a.tar.gz
dakkar-android-huawei-m5-c4023e77f2f7bce2f24730d8af9bb100b25bfd8a.tar.bz2
dakkar-android-huawei-m5-c4023e77f2f7bce2f24730d8af9bb100b25bfd8a.zip
make repo setup optional
Diffstat (limited to 'build.sh')
-rw-r--r--build.sh24
1 files changed, 15 insertions, 9 deletions
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