Skip to content

Commit b29e8c2

Browse files
committed
dumpyara.sh: Add more split push dir
Signed-off-by: zainarbani <[email protected]>
1 parent 67c5369 commit b29e8c2

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

dumpyara.sh

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -259,23 +259,22 @@ if [[ -n $GIT_OAUTH_TOKEN ]]; then
259259
git add --all
260260
git commit -asm "Add ${description}"
261261
git update-ref -d HEAD
262-
git reset system/ vendor/ product/
262+
tosplitpush="system vendor product my_product my_bigball my_stock my_preload my_heytap"
263+
git reset $tosplitpush
263264
git checkout -b "$branch"
264265
git commit -asm "Add extras for ${description}" && "${GITPUSH[@]}"
265-
git add vendor/
266-
git commit -asm "Add vendor for ${description}" && "${GITPUSH[@]}"
267-
git add system/system/app/ || git add system/app/
268-
git commit -asm "Add system app for ${description}" && "${GITPUSH[@]}"
269-
git add system/system/priv-app/ || git add system/priv-app/
270-
git commit -asm "Add system priv-app for ${description}" && "${GITPUSH[@]}"
271-
git add system/
272-
git commit -asm "Add system for ${description}" && "${GITPUSH[@]}"
273-
git add product/app/
274-
git commit -asm "Add product app for ${description}" && "${GITPUSH[@]}"
275-
git add product/priv-app/
276-
git commit -asm "Add product priv-app for ${description}" && "${GITPUSH[@]}"
277-
git add product/
278-
git commit -asm "Add product for ${description}" && "${GITPUSH[@]}"
266+
for tosplit in $tosplitpush; do
267+
if [[ -d $tosplit ]]; then
268+
if [[ $tosplit == @(system|product) ]]; then
269+
git add "$tosplit"/"$tosplit"/app/ || git add "$tosplit"/app/
270+
git commit -asm "Add ${tosplit} app for ${description}" && "${GITPUSH[@]}"
271+
git add "$tosplit"/"$tosplit"/priv-app/ || git add "$tosplit"/priv-app/
272+
git commit -asm "Add ${tosplit} priv-app for ${description}" && "${GITPUSH[@]}"
273+
fi
274+
git add "$tosplit"/
275+
git commit -asm "Add ${tosplit} for ${description}" && "${GITPUSH[@]}"
276+
fi
277+
done
279278
else
280279
echo "Dump done locally."
281280
exit 1

0 commit comments

Comments
 (0)