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