From b29e8c2ba99d530dabe972a58c9204663828ab17 Mon Sep 17 00:00:00 2001 From: zainarbani Date: Thu, 13 Jul 2023 00:58:44 +0700 Subject: [PATCH] dumpyara.sh: Add more split push dir Signed-off-by: zainarbani --- dumpyara.sh | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/dumpyara.sh b/dumpyara.sh index 5f66d5a..c95af00 100755 --- a/dumpyara.sh +++ b/dumpyara.sh @@ -259,23 +259,22 @@ if [[ -n $GIT_OAUTH_TOKEN ]]; then git add --all git commit -asm "Add ${description}" git update-ref -d HEAD - git reset system/ vendor/ product/ + tosplitpush="system vendor product my_product my_bigball my_stock my_preload my_heytap" + git reset $tosplitpush git checkout -b "$branch" git commit -asm "Add extras for ${description}" && "${GITPUSH[@]}" - git add vendor/ - git commit -asm "Add vendor for ${description}" && "${GITPUSH[@]}" - git add system/system/app/ || git add system/app/ - git commit -asm "Add system app for ${description}" && "${GITPUSH[@]}" - git add system/system/priv-app/ || git add system/priv-app/ - git commit -asm "Add system priv-app for ${description}" && "${GITPUSH[@]}" - git add system/ - git commit -asm "Add system for ${description}" && "${GITPUSH[@]}" - git add product/app/ - git commit -asm "Add product app for ${description}" && "${GITPUSH[@]}" - git add product/priv-app/ - git commit -asm "Add product priv-app for ${description}" && "${GITPUSH[@]}" - git add product/ - git commit -asm "Add product for ${description}" && "${GITPUSH[@]}" + for tosplit in $tosplitpush; do + if [[ -d $tosplit ]]; then + if [[ $tosplit == @(system|product) ]]; then + git add "$tosplit"/"$tosplit"/app/ || git add "$tosplit"/app/ + git commit -asm "Add ${tosplit} app for ${description}" && "${GITPUSH[@]}" + git add "$tosplit"/"$tosplit"/priv-app/ || git add "$tosplit"/priv-app/ + git commit -asm "Add ${tosplit} priv-app for ${description}" && "${GITPUSH[@]}" + fi + git add "$tosplit"/ + git commit -asm "Add ${tosplit} for ${description}" && "${GITPUSH[@]}" + fi + done else echo "Dump done locally." exit 1