diff options
author | Isaac J. Manjarres <isaacmanjarres@google.com> | 2023-03-22 00:15:13 -0700 |
---|---|---|
committer | Isaac J. Manjarres <isaacmanjarres@google.com> | 2023-03-22 00:41:18 -0700 |
commit | 0626853d5cc291c08dba516050813b3e153c9ba7 (patch) | |
tree | ab24c7c5e93e72c5b4547056c68a86f019b1bb9a | |
parent | 4b90ce7fa4540b6b4cb594fc3bfff6687361eb5c (diff) | |
download | msm-0626853d5cc291c08dba516050813b3e153c9ba7.tar.gz |
scripts/handle_aosp_merge.sh: Fix git remote addition
The current method of finding out what URL is used for AOSP
is not correct, as it picks up both the push and fetch URLs instead
of just the push one. Fix by stopping after detecting the first
URL.
Also, while we're here, correct the output redirection of popd
to /dev/null instead of dev/null.
Bug: 261218518
Change-Id: I7bb10da372b612e1e3ed43822379e170926d55b1
Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com>
-rwxr-xr-x | scripts/handle_aosp_merge.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/handle_aosp_merge.sh b/scripts/handle_aosp_merge.sh index 2423b99..4a7b67c 100755 --- a/scripts/handle_aosp_merge.sh +++ b/scripts/handle_aosp_merge.sh @@ -192,10 +192,10 @@ function merge_aosp_to_device_kernel() { pushd ${CUR_DIR}/${DEVICE_KERNEL_DIR} > /dev/null - aosp_remote=$(git remote -v | grep -oe "^aosp.*common") + aosp_remote=$(git remote -v | grep -o -m 1 -e "^aosp.*common") if [[ -z "${aosp_remote}" ]]; then - aosp_remote=$(git -C ${CUR_DIR}/${GKI_KERNEL_DIR} remote -v | grep -oe "^aosp.*common") - git remote add "${aosp_remote}" + aosp_remote=$(git -C ${CUR_DIR}/${GKI_KERNEL_DIR} remote -v | grep -o -m 1 -e "^aosp.*common") + git remote add ${aosp_remote} fi git fetch --quiet aosp "${AOSP_BRANCH}" @@ -242,7 +242,7 @@ function update_gki_prebuilts() { echo -e "\n${Yellow}Pushing updates to GKI prebuilts dir${Color_Off}" git push partner HEAD:refs/for/${BRANCH_DEVICE_KERNEL} -o topic=${TOPIC} - popd > dev/null + popd > /dev/null } sanitize_args |