#!/bin/bash . build/envsetup.sh NEWTAG="${1}" SQUASH="${2}" TOP="${ANDROID_BUILD_TOP}" MANIFEST="${TOP}/.repo/manifests/default.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 "${NEWTAG}" if [ $? -eq 1 ]; then read; fi fi done