From 58d9695425ec842b922e6c7f230e458b4b0e81c9 Mon Sep 17 00:00:00 2001 From: anjia0532 Date: Thu, 21 Jun 2018 09:23:18 +0800 Subject: [PATCH] fix bug --- deploy.sh | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/deploy.sh b/deploy.sh index 5a48b9e..7be3978 100644 --- a/deploy.sh +++ b/deploy.sh @@ -115,17 +115,22 @@ function mirror() sleep 30 compare - tmps=$(find ./gcr.io_mirror/ -type f \( -iname "*.tmp" \) -exec dirname {} \; | uniq | cut -d'/' -f3-4) - - if [ -n "$tmps[@]" ]; then - echo -e "${red} wait for push ${tmps[@]}" - for img in ${tmps[@]} ; do - n=$(echo ${img}|cut -d'/' -f1) - image=$(echo ${img}|cut -d'/' -f2) - process_run "pull_push_diff $n $image" - done - wait ${!} - fi + while true + do + tmps=$(find ./gcr.io_mirror/ -type f \( -iname "*.tmp" \) -exec dirname {} \; | uniq | cut -d'/' -f3-4) + if [ -n "$tmps[@]" ]; then + echo -e "${red} wait for push ${tmps[@]}" + for img in ${tmps[@]} ; do + n=$(echo ${img}|cut -d'/' -f1) + image=$(echo ${img}|cut -d'/' -f2) + process_run "pull_push_diff $n $image" + done + wait + else + break + fi + sleep 30 + done images=($(find ./gcr.io_mirror/ -type f -name "*.tag" |uniq|sort))