aosp-merger: allow running from any directory

Change-Id: I14907315ed2e9fcbc3db7bcb0a74e3d5e00c68c8
This commit is contained in:
Michael Bestas
2022-01-10 16:26:01 +02:00
committed by Chirayu Desai
parent f5199e1afa
commit 6fb4c9a940
5 changed files with 8 additions and 38 deletions

View File

@@ -26,19 +26,13 @@ if [ "${OPERATION}" != "merge" -a "${OPERATION}" != "rebase" ]; then
exit 1
fi
# Check to make sure this is being run from the top level repo dir
if [ ! -e "build/envsetup.sh" ]; then
echo "Must be run from the top level repo dir"
exit 1
fi
### CONSTANTS ###
readonly script_path="$(cd "$(dirname "$0")";pwd -P)"
readonly vars_path="${script_path}/../vars"
source "${vars_path}/common"
TOP="${ANDROID_BUILD_TOP}"
TOP="${script_path}/../../.."
MERGEDREPOS="${TOP}/merged_repos_aosp.txt"
MANIFEST="${TOP}/.repo/manifests/default.xml"
export STAGINGBRANCH="staging/${OLDTAG}_${OPERATION}-${NEWTAG}"