summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Wang <wangzefeng@huawei.com>2019-09-30 02:46:15 +0000
committerKevin Wang <wangzefeng@huawei.com>2019-09-30 03:12:09 +0000
commitc11393b73a9b3661051266b6436bf067480dd071 (patch)
treee9760ad50d44e91b436b794d02e91da81dbc94fa
parentadd scripts for syncing standalone subprojects code into tree (diff)
downloadkubeedge-c11393b73a9b3661051266b6436bf067480dd071.tar.gz
use get-url instead -v for git remote check
-rwxr-xr-xhack/sync-subproject-code.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/hack/sync-subproject-code.sh b/hack/sync-subproject-code.sh
index 5fc64dcf3..33b439b8d 100755
--- a/hack/sync-subproject-code.sh
+++ b/hack/sync-subproject-code.sh
@@ -49,7 +49,8 @@ fi
function check-and-add-upstream() {
local upstream=$1
local upstream_url=$2
- git remote -v | grep -qE "^${upstream}\b.*${upstream_url}" || rc="$?"
+ # git remote -v | grep -qE "^${upstream}\b.*${upstream_url}" || rc="$?"
+ git remote get-url ${upstream} | grep -qE "${upstream_url}" || rc="$?"
if [[ "${rc}" -ne "0" ]]; then
printf "[INFO] git remote not found, adding: %s\t%s\n" ${upstream} ${upstream_url}
git remote add ${upstream} ${upstream_url}