summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.sh11
1 files changed, 8 insertions, 3 deletions
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