aosp-merger: allow running from any directory
Change-Id: I14907315ed2e9fcbc3db7bcb0a74e3d5e00c68c8
This commit is contained in:
committed by
Chirayu Desai
parent
f5199e1afa
commit
6fb4c9a940
@@ -25,27 +25,21 @@ if [ "${OPERATION}" != "merge" -a "${OPERATION}" != "rebase" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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 ###
|
### CONSTANTS ###
|
||||||
readonly script_path="$(cd "$(dirname "$0")";pwd -P)"
|
readonly script_path="$(cd "$(dirname "$0")";pwd -P)"
|
||||||
readonly vars_path="${script_path}/../vars"
|
readonly vars_path="${script_path}/../vars"
|
||||||
|
|
||||||
source "${vars_path}/common"
|
source "${vars_path}/common"
|
||||||
|
|
||||||
# Source build environment (needed for aospremote)
|
TOP="${script_path}/../../.."
|
||||||
. build/envsetup.sh
|
|
||||||
|
|
||||||
TOP="${ANDROID_BUILD_TOP}"
|
|
||||||
MERGEDREPOS="${TOP}/merged_repos.txt"
|
MERGEDREPOS="${TOP}/merged_repos.txt"
|
||||||
MANIFEST="${TOP}/.repo/manifests/default.xml"
|
MANIFEST="${TOP}/.repo/manifests/default.xml"
|
||||||
BRANCH="${calyxos_branch}"
|
BRANCH="${calyxos_branch}"
|
||||||
export STAGINGBRANCH="staging/${BRANCH}_${OPERATION}-${NEWTAG}"
|
export STAGINGBRANCH="staging/${BRANCH}_${OPERATION}-${NEWTAG}"
|
||||||
|
|
||||||
|
# Source build environment (needed for aospremote)
|
||||||
|
source "${TOP}/build/envsetup.sh"
|
||||||
|
|
||||||
# Build list of LineageOS forked repos
|
# Build list of LineageOS forked repos
|
||||||
PROJECTPATHS=$(grep "name=\"LineageOS/" "${MANIFEST}" | sed -n 's/.*path="\([^"]\+\)".*/\1/p')
|
PROJECTPATHS=$(grep "name=\"LineageOS/" "${MANIFEST}" | sed -n 's/.*path="\([^"]\+\)".*/\1/p')
|
||||||
|
|
||||||
|
|||||||
@@ -26,19 +26,13 @@ if [ "${OPERATION}" != "merge" -a "${OPERATION}" != "rebase" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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 ###
|
### CONSTANTS ###
|
||||||
readonly script_path="$(cd "$(dirname "$0")";pwd -P)"
|
readonly script_path="$(cd "$(dirname "$0")";pwd -P)"
|
||||||
readonly vars_path="${script_path}/../vars"
|
readonly vars_path="${script_path}/../vars"
|
||||||
|
|
||||||
source "${vars_path}/common"
|
source "${vars_path}/common"
|
||||||
|
|
||||||
TOP="${ANDROID_BUILD_TOP}"
|
TOP="${script_path}/../../.."
|
||||||
MERGEDREPOS="${TOP}/merged_repos_aosp.txt"
|
MERGEDREPOS="${TOP}/merged_repos_aosp.txt"
|
||||||
MANIFEST="${TOP}/.repo/manifests/default.xml"
|
MANIFEST="${TOP}/.repo/manifests/default.xml"
|
||||||
export STAGINGBRANCH="staging/${OLDTAG}_${OPERATION}-${NEWTAG}"
|
export STAGINGBRANCH="staging/${OLDTAG}_${OPERATION}-${NEWTAG}"
|
||||||
|
|||||||
@@ -25,26 +25,20 @@ if [ "${OPERATION}" != "merge" -a "${OPERATION}" != "rebase" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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 ###
|
### CONSTANTS ###
|
||||||
readonly script_path="$(cd "$(dirname "$0")";pwd -P)"
|
readonly script_path="$(cd "$(dirname "$0")";pwd -P)"
|
||||||
readonly vars_path="${script_path}/../vars"
|
readonly vars_path="${script_path}/../vars"
|
||||||
|
|
||||||
source "${vars_path}/common"
|
source "${vars_path}/common"
|
||||||
|
|
||||||
# Source build environment (needed for calyxremote)
|
|
||||||
. build/envsetup.sh
|
|
||||||
|
|
||||||
TOP="${script_path}/../../.."
|
TOP="${script_path}/../../.."
|
||||||
MERGEDREPOS="${TOP}/merged_repos.txt"
|
MERGEDREPOS="${TOP}/merged_repos.txt"
|
||||||
BRANCH="${calyxos_branch}"
|
BRANCH="${calyxos_branch}"
|
||||||
STAGINGBRANCH="staging/${BRANCH}_${OPERATION}-${NEWTAG}"
|
STAGINGBRANCH="staging/${BRANCH}_${OPERATION}-${NEWTAG}"
|
||||||
|
|
||||||
|
# Source build environment (needed for calyxremote)
|
||||||
|
source "${TOP}/build/envsetup.sh"
|
||||||
|
|
||||||
# List of merged repos
|
# List of merged repos
|
||||||
PROJECTPATHS=$(cat ${MERGEDREPOS} | grep -w merge | awk '{printf "%s\n", $2}')
|
PROJECTPATHS=$(cat ${MERGEDREPOS} | grep -w merge | awk '{printf "%s\n", $2}')
|
||||||
|
|
||||||
|
|||||||
@@ -25,12 +25,6 @@ if [ "${OPERATION}" != "merge" -a "${OPERATION}" != "rebase" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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 ###
|
### CONSTANTS ###
|
||||||
readonly script_path="$(cd "$(dirname "$0")";pwd -P)"
|
readonly script_path="$(cd "$(dirname "$0")";pwd -P)"
|
||||||
readonly vars_path="${script_path}/../vars"
|
readonly vars_path="${script_path}/../vars"
|
||||||
|
|||||||
@@ -25,12 +25,6 @@ if [ "${OPERATION}" != "merge" -a "${OPERATION}" != "rebase" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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 ###
|
### CONSTANTS ###
|
||||||
readonly script_path="$(cd "$(dirname "$0")";pwd -P)"
|
readonly script_path="$(cd "$(dirname "$0")";pwd -P)"
|
||||||
readonly vars_path="${script_path}/../vars"
|
readonly vars_path="${script_path}/../vars"
|
||||||
|
|||||||
Reference in New Issue
Block a user