summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac J. Manjarres <isaacmanjarres@google.com>2023-03-22 00:15:13 -0700
committerIsaac J. Manjarres <isaacmanjarres@google.com>2023-03-22 00:41:18 -0700
commit0626853d5cc291c08dba516050813b3e153c9ba7 (patch)
treeab24c7c5e93e72c5b4547056c68a86f019b1bb9a
parent4b90ce7fa4540b6b4cb594fc3bfff6687361eb5c (diff)
downloadmsm-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-xscripts/handle_aosp_merge.sh8
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