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

@@ -25,26 +25,20 @@ 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"
# Source build environment (needed for calyxremote)
. build/envsetup.sh
TOP="${script_path}/../../.."
MERGEDREPOS="${TOP}/merged_repos.txt"
BRANCH="${calyxos_branch}"
STAGINGBRANCH="staging/${BRANCH}_${OPERATION}-${NEWTAG}"
# Source build environment (needed for calyxremote)
source "${TOP}/build/envsetup.sh"
# List of merged repos
PROJECTPATHS=$(cat ${MERGEDREPOS} | grep -w merge | awk '{printf "%s\n", $2}')