Signed-off-by: Hu XueJiao 1034502035@qq.com --- sparrow/3-code/git | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/sparrow/3-code/git b/sparrow/3-code/git index 48741ec..d72b531 100755 --- a/sparrow/3-code/git +++ b/sparrow/3-code/git @@ -5,14 +5,10 @@ # fix files permissions cause container service start failed umask 002
-# download git trees - -cd /c || exit - -# git clone https://gitee.com/openeuler/compass-ci.git +# git clone compass-ci, lkp-tests, upstream-repos # modify and manual run for now: -[ -d "compass-ci/.git" ] || { - git clone https://gitee.com/wu_fengguang/compass-ci.git +[ -d "/c/compass-ci/.git" ] || { + git clone https://gitee.com/wu_fengguang/compass-ci.git /c/compass-ci
cd /c/compass-ci || exit [ -n "$compass_commit_id" ] && git reset --hard "$compass_commit_id" @@ -20,15 +16,15 @@ cd /c || exit ln -s compass-ci /c/cci }
-[ -d "lkp-tests/.git" ] || { - git clone https://gitee.com/wu_fengguang/lkp-tests.git +[ -d "/c/lkp-tests/.git" ] || { + git clone https://gitee.com/wu_fengguang/lkp-tests.git /c/lkp-tests
cd /c/lkp-tests || exit [ -n "$lkp_commit_id" ] && git reset --hard "$lkp_commit_id" }
-[ -d "upstream-repos/.git" ] || { - git clone https://gitee.com/wu_fengguang/upstream-repos.git +[ -d "/c/upstream-repos/.git" ] || { + git clone https://gitee.com/wu_fengguang/upstream-repos.git /c/upstream-repos
cd /c/upstream-repos || exit [ -n "$upstream_commit_id" ] && git reset --hard "$upstream_commit_id"
Looks we can write a common function to handle the repos in roughly same way.
On Thu, Jan 07, 2021 at 04:35:16PM +0800, Hu Xuejiao wrote:
Signed-off-by: Hu XueJiao 1034502035@qq.com
sparrow/3-code/git | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/sparrow/3-code/git b/sparrow/3-code/git index 48741ec..d72b531 100755 --- a/sparrow/3-code/git +++ b/sparrow/3-code/git @@ -5,14 +5,10 @@ # fix files permissions cause container service start failed umask 002
-# download git trees
-cd /c || exit
-# git clone https://gitee.com/openeuler/compass-ci.git +# git clone compass-ci, lkp-tests, upstream-repos # modify and manual run for now: -[ -d "compass-ci/.git" ] || {
+[ -d "/c/compass-ci/.git" ] || {
git clone https://gitee.com/wu_fengguang/compass-ci.git /c/compass-ci
cd /c/compass-ci || exit [ -n "$compass_commit_id" ] && git reset --hard "$compass_commit_id"
@@ -20,15 +16,15 @@ cd /c || exit ln -s compass-ci /c/cci }
-[ -d "lkp-tests/.git" ] || {
+[ -d "/c/lkp-tests/.git" ] || {
git clone https://gitee.com/wu_fengguang/lkp-tests.git /c/lkp-tests
cd /c/lkp-tests || exit [ -n "$lkp_commit_id" ] && git reset --hard "$lkp_commit_id"
}
-[ -d "upstream-repos/.git" ] || {
+[ -d "/c/upstream-repos/.git" ] || {
git clone https://gitee.com/wu_fengguang/upstream-repos.git /c/upstream-repos
cd /c/upstream-repos || exit [ -n "$upstream_commit_id" ] && git reset --hard "$upstream_commit_id"
-- 2.23.0