From 87bfe65d8cfd3be89e149eaba6d99b8bc8c92a37 Mon Sep 17 00:00:00 2001 From: dakkar Date: Fri, 13 Jul 2018 11:29:58 +0100 Subject: split init/setup --- build.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index dd7f6c6..1b00d58 100644 --- a/build.sh +++ b/build.sh @@ -4,7 +4,7 @@ set -e thisdir="$(readlink -f "$(dirname "$0")")" - +echo "thisdir=$thisdir" release_name="$(date +%y%m%d)" mkdir -p release/"$release_name" @@ -27,9 +27,11 @@ function clone_or_checkout() { fi } -function setup_code() { +function init_repo() { repo init -u https://github.com/LineageOS/android.git -b lineage-15.1 +} +function setup_code() { 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 @@ -42,7 +44,10 @@ function setup_code() { bash "$thisdir/apply-patches.sh" dakkar-patches } -if [[ "$1" == "setup" ]]; then +if [[ "$1" == "init" ]]; then + init_repo + setup_code +elif [[ "$1" == "setup" ]]; then setup_code fi -- cgit v1.2.3