From b053978b3853e03038648e75576d8097bf24c910 Mon Sep 17 00:00:00 2001 From: Pete Fotheringham Date: Mon, 2 Sep 2024 13:05:20 +0100 Subject: [PATCH] Branch-specific stuff --- src/new_build.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/new_build.sh b/src/new_build.sh index e2d3a00..3aea0e0 100644 --- a/src/new_build.sh +++ b/src/new_build.sh @@ -153,3 +153,31 @@ if [ "$LOCAL_MIRROR" = true ]; then echo ">> [$(date)] Sync mirror repository disabled" | tee -a "$repo_log" fi fi + +# Branch-specific stuff +branch=$BRANCH_NAME +branch_dir=${branch//[^[:alnum:]]/_} +branch_dir=${branch_dir^^} +echo ">> [$(date)] Branch: $branch" + +vendor=lineage + +devices=$DEVICE_LIST +echo ">> [$(date)] Devices: $devices" + +if [ -n "$branch" ] && [ -n "$devices" ]; then + case "$branch" in + lineage-21.0*) + themuppets_branch="lineage-21.0" + android_version="14" + ;; + *) + echo ">> [$(date)] Building branch $branch is not (yet) suppported" + exit 1 + ;; + esac + android_version_major=$(cut -d '.' -f 1 <<< $android_version) + + mkdir -p "$SRC_DIR/$branch_dir" + cd "$SRC_DIR/$branch_dir" +fi