diff options
| author | Kevin Wang <wangzefeng@huawei.com> | 2019-09-30 02:46:15 +0000 |
|---|---|---|
| committer | Kevin Wang <wangzefeng@huawei.com> | 2019-09-30 03:12:09 +0000 |
| commit | c11393b73a9b3661051266b6436bf067480dd071 (patch) | |
| tree | e9760ad50d44e91b436b794d02e91da81dbc94fa /hack/sync-subproject-code.sh | |
| parent | add scripts for syncing standalone subprojects code into tree (diff) | |
| download | kubeedge-c11393b73a9b3661051266b6436bf067480dd071.tar.gz | |
use get-url instead -v for git remote check
Diffstat (limited to 'hack/sync-subproject-code.sh')
| -rwxr-xr-x | hack/sync-subproject-code.sh | 3 |
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} |
