#!/bin/bash . build/envsetup.sh PLATFORM="${1}" SQUASH="${2}" TOP="${ANDROID_BUILD_TOP}" MANIFEST="${TOP}/.repo/manifest.xml" BRANCH=$(grep "default revision" "${MANIFEST}" \ | sed 's/^ *//g;s/ /dev/null; then git commit --no-edit OLD_MSG=$(git log --format=%B -n1) git commit --amend -m "[DNM] Squash of ${STAGINGBRANCH}" -m "$OLD_MSG" fi else git merge --log aosp/"${PLATFORM}"-gsi if [ $? -eq 1 ]; then read; fi fi done