From 3c91281388e7b0f2d7f3305f4147d24e0d6f9ce0 Mon Sep 17 00:00:00 2001 From: Hui Yiqun Date: Tue, 27 Dec 2016 09:47:10 +0800 Subject: [PATCH] fix the repeated git_repack --- cros.sh | 12 ++++++------ weave.sh | 11 +++++------ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/cros.sh b/cros.sh index a54f383..bd434c3 100755 --- a/cros.sh +++ b/cros.sh @@ -49,13 +49,13 @@ function git_repack() { git_clone_or_pull $MANIFEST_URL $MANIFEST_DIR for repo in $($MANIFEST_XML_REPOLIST $MANIFEST_DIR/default.xml cros chromium); do + contains $repo ${IGNORED_REPO[@]} && continue + echo $TUNASYNC_UPSTREAM_URL/$repo if [[ -z ${DRY_RUN:-} ]]; then - contains $repo ${IGNORED_REPO[@]} && continue git_clone_or_pull $TUNASYNC_UPSTREAM_URL/$repo $TUNASYNC_WORKING_DIR/$repo yes - if [[ "$USE_BITMAP_INDEX" == "1" ]]; then - git_repack - fi - else - echo $TUNASYNC_UPSTREAM_URL/$repo fi done + +if [[ -z ${DRY_RUN:-} && "$USE_BITMAP_INDEX" == "1" ]]; then + git_repack +fi diff --git a/weave.sh b/weave.sh index 7c3016f..71a0810 100755 --- a/weave.sh +++ b/weave.sh @@ -54,13 +54,12 @@ git_clone_or_pull $MANIFEST_URL $MANIFEST_DIR for repo in $($MANIFEST_XML_REPOLIST $MANIFEST_DIR/default.xml weave); do contains $repo ${IGNORED_REPO[@]} && continue + echo $TUNASYNC_UPSTREAM_URL/$repo if [[ -z ${DRY_RUN:-} ]]; then - echo $TUNASYNC_UPSTREAM_URL/$repo git_clone_or_pull $TUNASYNC_UPSTREAM_URL/$repo $TUNASYNC_WORKING_DIR/$repo yes - if [[ "$USE_BITMAP_INDEX" == "1" ]]; then - git_repack - fi - else - echo $TUNASYNC_UPSTREAM_URL/$repo fi done + +if [[ -z ${DRY_RUN:-} && "$USE_BITMAP_INDEX" == "1" ]]; then + git_repack +fi